pub enum KeyDerivationParams {
HKDF(HKDFParams),
PBKDF2(PBKDF2Params),
Scrypt(ScryptParams),
Argon2id(Argon2idParams),
SSHAgent(SSHAgentParams),
}
Expand description
Enum representing the derivation parameters.
Variants§
HKDF(HKDFParams)
PBKDF2(PBKDF2Params)
Scrypt(ScryptParams)
Argon2id(Argon2idParams)
SSHAgent(SSHAgentParams)
Implementations§
Source§impl KeyDerivationParams
impl KeyDerivationParams
Sourcepub fn method(&self) -> KeyDerivationMethod
pub fn method(&self) -> KeyDerivationMethod
Returns the key derivation method associated with the parameters.
pub fn is_password_based(&self) -> bool
pub fn is_ssh_agent(&self) -> bool
pub fn lock( &mut self, content_key: &SymmetricKey, secret: impl AsRef<[u8]>, ) -> Result<EncryptedMessage>
Trait Implementations§
Source§impl Clone for KeyDerivationParams
impl Clone for KeyDerivationParams
Source§fn clone(&self) -> KeyDerivationParams
fn clone(&self) -> KeyDerivationParams
Returns a duplicate 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 Debug for KeyDerivationParams
impl Debug for KeyDerivationParams
Source§impl Display for KeyDerivationParams
impl Display for KeyDerivationParams
Source§impl From<KeyDerivationParams> for CBOR
impl From<KeyDerivationParams> for CBOR
Source§fn from(value: KeyDerivationParams) -> Self
fn from(value: KeyDerivationParams) -> Self
Converts to this type from the input type.
Source§impl PartialEq for KeyDerivationParams
impl PartialEq for KeyDerivationParams
Source§impl TryFrom<CBOR> for KeyDerivationParams
impl TryFrom<CBOR> for KeyDerivationParams
impl Eq for KeyDerivationParams
impl StructuralPartialEq for KeyDerivationParams
Auto Trait Implementations§
impl Freeze for KeyDerivationParams
impl !RefUnwindSafe for KeyDerivationParams
impl !Send for KeyDerivationParams
impl !Sync for KeyDerivationParams
impl Unpin for KeyDerivationParams
impl !UnwindSafe for KeyDerivationParams
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