pub enum KeyDerivation {
Argon2Id,
BalloonHash,
}Expand description
Supported key derivation functions.
Variants§
Implementations§
Source§impl KeyDerivation
impl KeyDerivation
Sourcepub fn deriver(&self) -> Box<dyn Deriver<Sha256> + Send + 'static>
pub fn deriver(&self) -> Box<dyn Deriver<Sha256> + Send + 'static>
Get the deriver for this key derivation function.
Sourcepub fn generate_salt() -> SaltString
pub fn generate_salt() -> SaltString
Generate a new salt string.
Sourcepub fn parse_salt<S: AsRef<str>>(salt: S) -> Result<SaltString, Error>
pub fn parse_salt<S: AsRef<str>>(salt: S) -> Result<SaltString, Error>
Parse a saved salt string.
Sourcepub fn generate_seed() -> Seed
👎Deprecated
pub fn generate_seed() -> Seed
Generate new random seed entropy.
Trait Implementations§
Source§impl Clone for KeyDerivation
impl Clone for KeyDerivation
Source§fn clone(&self) -> KeyDerivation
fn clone(&self) -> KeyDerivation
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 KeyDerivation
impl Debug for KeyDerivation
Source§impl Decodable for KeyDerivation
impl Decodable for KeyDerivation
Source§impl Default for KeyDerivation
impl Default for KeyDerivation
Source§impl<'de> Deserialize<'de> for KeyDerivation
impl<'de> Deserialize<'de> for KeyDerivation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for KeyDerivation
impl Display for KeyDerivation
Source§impl Encodable for KeyDerivation
impl Encodable for KeyDerivation
Source§fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn encode<'life0, 'life1, 'async_trait, W>(
&'life0 self,
writer: &'life1 mut BinaryWriter<W>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
W: 'async_trait + AsyncWrite + AsyncSeek + Unpin + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Encode self into the binary writer.
Source§impl From<&KeyDerivation> for u8
impl From<&KeyDerivation> for u8
Source§fn from(value: &KeyDerivation) -> Self
fn from(value: &KeyDerivation) -> Self
Converts to this type from the input type.
Source§impl FromStr for KeyDerivation
impl FromStr for KeyDerivation
Source§impl Hash for KeyDerivation
impl Hash for KeyDerivation
Source§impl PartialEq for KeyDerivation
impl PartialEq for KeyDerivation
Source§impl Serialize for KeyDerivation
impl Serialize for KeyDerivation
Source§impl TryFrom<u8> for KeyDerivation
impl TryFrom<u8> for KeyDerivation
impl Copy for KeyDerivation
impl Eq for KeyDerivation
impl StructuralPartialEq for KeyDerivation
Auto Trait Implementations§
impl Freeze for KeyDerivation
impl RefUnwindSafe for KeyDerivation
impl Send for KeyDerivation
impl Sync for KeyDerivation
impl Unpin for KeyDerivation
impl UnwindSafe for KeyDerivation
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