Struct btlib::crypto::ConcreteCreds
source · pub struct ConcreteCreds { /* private fields */ }
Implementations§
source§impl ConcreteCreds
impl ConcreteCreds
pub fn new( sign: AsymKeyPair<Sign>, encrypt: AsymKeyPair<Encrypt> ) -> ConcreteCreds
pub fn generate() -> Result<ConcreteCreds>
pub fn set_writecap(&mut self, writecap: Writecap) -> Result<()>
pub fn sign_pair(&self) -> &AsymKeyPair<Sign>
pub fn encrypt_pair(&self) -> &AsymKeyPair<Encrypt>
Trait Implementations§
source§impl Clone for ConcreteCreds
impl Clone for ConcreteCreds
source§fn clone(&self) -> ConcreteCreds
fn clone(&self) -> ConcreteCreds
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CredsPriv for ConcreteCreds
impl CredsPriv for ConcreteCreds
source§impl CredsPub for ConcreteCreds
impl CredsPub for ConcreteCreds
source§fn public_sign(&self) -> &AsymKey<Public, Sign>
fn public_sign(&self) -> &AsymKey<Public, Sign>
Returns a reference to the public signing key which can be used to verify signatures.
fn concrete_pub(&self) -> ConcretePub
fn sign_kind(&self) -> Sign
source§impl<'de> Deserialize<'de> for ConcreteCreds
impl<'de> Deserialize<'de> for ConcreteCreds
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Principaled for ConcreteCreds
impl Principaled for ConcreteCreds
source§impl Serialize for ConcreteCreds
impl Serialize for ConcreteCreds
source§impl Signer for ConcreteCreds
impl Signer for ConcreteCreds
source§fn init_sign(&self) -> Result<Box<dyn SignOp + '_>>
fn init_sign(&self) -> Result<Box<dyn SignOp + '_>>
Starts a new signing operation and returns the struct representing it.
source§fn sign(&self, parts: &mut dyn Iterator<Item = &[u8]>) -> Result<Signature>
fn sign(&self, parts: &mut dyn Iterator<Item = &[u8]>) -> Result<Signature>
Returns a signature over the given parts. It’s critical that subsequent invocations
of this method on the same instance return a Signature with
data
fields of the same
length.fn kind(&self) -> Sign
fn sign_writecap(&self, writecap: &mut Writecap) -> Result<()>
Auto Trait Implementations§
impl RefUnwindSafe for ConcreteCreds
impl Send for ConcreteCreds
impl Sync for ConcreteCreds
impl Unpin for ConcreteCreds
impl UnwindSafe for ConcreteCreds
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> DecrypterExt for Twhere
T: Decrypter + ?Sized,
impl<T> DecrypterExt for Twhere T: Decrypter + ?Sized,
fn ser_decrypt<T: DeserializeOwned>(&self, ct: &Ciphertext<T>) -> Result<T>
source§impl<T> EncrypterExt for Twhere
T: Encrypter + ?Sized,
impl<T> EncrypterExt for Twhere T: Encrypter + ?Sized,
source§fn ser_encrypt<T: Serialize>(&self, value: &T) -> Result<Ciphertext<T>>
fn ser_encrypt<T: Serialize>(&self, value: &T) -> Result<Ciphertext<T>>
Serializes the given value into a new vector, then encrypts it and returns the resulting
ciphertext.