Trait fog_crypto::lock::LockInterface [−][src]
A decryption interface, implemented by anything that can hold a private cryptographic decryption key.
An implementor must handle all supported Diffie-Hellman algorithms and symmetric-key encryption algorithms.
Required methods
fn id(&self) -> &LockId[src]
Get the corresponding LockId for the private key.
fn decrypt_lock_key(
&self,
lockbox: &LockLockboxRef
) -> Result<LockKey, CryptoError>[src]
&self,
lockbox: &LockLockboxRef
) -> Result<LockKey, CryptoError>
Decrypt an exported LockKey.
fn decrypt_identity_key(
&self,
lockbox: &IdentityLockboxRef
) -> Result<IdentityKey, CryptoError>[src]
&self,
lockbox: &IdentityLockboxRef
) -> Result<IdentityKey, CryptoError>
Decrypt an exported IdentityKey.
fn decrypt_stream_key(
&self,
lockbox: &StreamLockboxRef
) -> Result<StreamKey, CryptoError>[src]
&self,
lockbox: &StreamLockboxRef
) -> Result<StreamKey, CryptoError>
Decrypt an exported StreamKey.
fn decrypt_data(&self, lockbox: &DataLockboxRef) -> Result<Vec<u8>, CryptoError>[src]
Decrypt encrypted data.
fn self_export_lock(
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<LockLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<LockLockbox>
Export the decryption key in a LockLockbox, 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<LockLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<LockLockbox>
Export the decryption key in a LockLockbox, with receive_stream as the recipient. If the
key cannot be exported, this should return None.
Implementors
impl LockInterface for ContainedLockKey[src]
fn id(&self) -> &LockId[src]
fn decrypt_lock_key(
&self,
lockbox: &LockLockboxRef
) -> Result<LockKey, CryptoError>[src]
&self,
lockbox: &LockLockboxRef
) -> Result<LockKey, CryptoError>
fn decrypt_identity_key(
&self,
lockbox: &IdentityLockboxRef
) -> Result<IdentityKey, CryptoError>[src]
&self,
lockbox: &IdentityLockboxRef
) -> Result<IdentityKey, CryptoError>
fn decrypt_stream_key(
&self,
lockbox: &StreamLockboxRef
) -> Result<StreamKey, CryptoError>[src]
&self,
lockbox: &StreamLockboxRef
) -> Result<StreamKey, CryptoError>
fn decrypt_data(&self, lockbox: &DataLockboxRef) -> Result<Vec<u8>, CryptoError>[src]
fn self_export_lock(
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<LockLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_lock: &LockId
) -> Option<LockLockbox>
fn self_export_stream(
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<LockLockbox>[src]
&self,
csprng: &mut dyn CryptoSrc,
receive_stream: &StreamKey
) -> Option<LockLockbox>