Trait sarkara::pwhash::KeyDerive
[−]
[src]
pub trait KeyDerive: Default { fn with_size(&mut self, len: usize) -> &mut Self; fn with_key(&mut self, key: &[u8]) -> &mut Self; fn with_aad(&mut self, aad: &[u8]) -> &mut Self; fn with_opslimit(&mut self, opslimit: u32) -> &mut Self; fn with_memlimit(&mut self, memlimit: u32) -> &mut Self; fn derive<K>(&self,
password: &[u8],
salt: &[u8])
-> Result<K, KeyDerivationFail> where K: From<Vec<u8>>; }
KeyDerive
trait.
Required Methods
fn with_size(&mut self, len: usize) -> &mut Self
Set output length.
fn with_key(&mut self, key: &[u8]) -> &mut Self
Set key.
fn with_aad(&mut self, aad: &[u8]) -> &mut Self
Set associated data.
fn with_opslimit(&mut self, opslimit: u32) -> &mut Self
Set opslimit parameter.
fn with_memlimit(&mut self, memlimit: u32) -> &mut Self
Set memlimit parameter.
fn derive<K>(&self,
password: &[u8],
salt: &[u8])
-> Result<K, KeyDerivationFail> where K: From<Vec<u8>>
password: &[u8],
salt: &[u8])
-> Result<K, KeyDerivationFail> where K: From<Vec<u8>>
Implementors
impl KeyDerive for Argon2i