pub trait DeriveKey: 'static {
// Required methods
fn salt_len(&self) -> usize;
fn derive_key(
&self,
buf: &mut [u8],
password: &[u8],
salt: &[u8],
) -> Result<(), Error>;
}Expand description
Key derivation function (KDF).
An instance of DeriveKey implementation corresponds to a particular set of difficulty params
of a particular KDF.
§Implementation notes
If you want to use a DeriveKey implementation with an Eraser, it should
additionally implement the following traits:
Default(should return a KDF instance with reasonable difficulty params)CloneSerialize/Deserializefromserde
Required Methods§
Trait Implementations§
Implementations on Foreign Types§
Implementors§
impl DeriveKey for pwbox::pure::Scrypt
Available on crate feature
pure only.impl DeriveKey for pwbox::rcrypto::Scrypt
Available on crate feature
rust-crypto only.impl DeriveKey for pwbox::sodium::Scrypt
Available on crate feature
exonum_sodiumoxide only.impl DeriveKey for ScryptCompat
Available on crate feature
exonum_sodiumoxide only.