pub struct DerivationParameters { /* private fields */ }Expand description
Serializable parameters that fully describe a completed key derivation. Can be stored alongside a user record to re-derive the same key later.
Implementations§
Source§impl DerivationParameters
impl DerivationParameters
Sourcepub fn derive(&self, password: &[u8]) -> Result<SecretKey>
pub fn derive(&self, password: &[u8]) -> Result<SecretKey>
Derives a SecretKey from password using these derivation parameters.
Sourcepub fn compute(&self, password: &[u8]) -> Result<Zeroizing<Vec<u8>>>
pub fn compute(&self, password: &[u8]) -> Result<Zeroizing<Vec<u8>>>
Re-derives raw bytes from a password using the stored algorithm and parameters.
Sourcepub fn output_length(&self) -> usize
pub fn output_length(&self) -> usize
Returns the byte-length of the hash that compute will produce.
Trait Implementations§
Source§impl Clone for DerivationParameters
impl Clone for DerivationParameters
Source§fn clone(&self) -> DerivationParameters
fn clone(&self) -> DerivationParameters
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DerivationParameters
impl Debug for DerivationParameters
Source§impl From<DerivationParameters> for Vec<u8>
impl From<DerivationParameters> for Vec<u8>
Source§fn from(data: DerivationParameters) -> Self
fn from(data: DerivationParameters) -> Self
Converts to this type from the input type.
Source§impl HeaderType for DerivationParameters
impl HeaderType for DerivationParameters
Auto Trait Implementations§
impl Freeze for DerivationParameters
impl RefUnwindSafe for DerivationParameters
impl Send for DerivationParameters
impl Sync for DerivationParameters
impl Unpin for DerivationParameters
impl UnsafeUnpin for DerivationParameters
impl UnwindSafe for DerivationParameters
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