Trait fog_crypto::identity::SignInterface [−][src]
A Signature interface, implemented by anything that can hold a private cryptographic signing key.
An implementor must handle all supported cryptographic signing algorithms.
Required methods
fn id(&self) -> &Identity[src]
Get the corresponding Identity for the private key.
fn sign(&self, hash: &Hash) -> Signature[src]
Sign a hash.
fn self_export_lock(
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<IdentityLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<IdentityLockbox>
Export the signing key in an IdentityLockbox, with receive_lock as the recipient. If
the key cannot be exported, this should return None.
fn self_export_stream(
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<IdentityLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<IdentityLockbox>
Export the signing key in an IdentityLockbox, with receive_stream as the recipient. If
the key cannot be exported, this should return None. Additionally, if the underlying
implementation does not allow moving the raw key into memory (i.e. it cannot call
StreamInterface::encrypt or lock_id_encrypt) then None
can also be returned.
Implementors
impl SignInterface for ContainedIdKey[src]
fn sign(&self, hash: &Hash) -> Signature[src]
fn id(&self) -> &Identity[src]
fn self_export_lock(
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<IdentityLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<IdentityLockbox>
fn self_export_stream(
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<IdentityLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<IdentityLockbox>