Enum emerald_rs::keystore::Kdf
[−]
[src]
pub enum Kdf { Pbkdf2 { prf: Prf, c: u32, }, Scrypt { n: u32, r: u32, p: u32, }, }
Key derivation function
Variants
Pbkdf2
PBKDF2 (not recommended, specified in (RFC 2898)[https://tools.ietf.org/html/rfc2898])
Fields of Pbkdf2
prf: Prf | Pseudo-Random Functions ( |
c: u32 | Number of iterations ( |
Scrypt
Scrypt (by default, specified in (RPC 7914)[https://tools.ietf.org/html/rfc7914])
Fields of Scrypt
n: u32 | Number of iterations ( |
r: u32 | Block size for the underlying hash ( |
p: u32 | Parallelization factor ( |
Methods
impl Kdf
[src]
pub fn derive(&self, len: usize, kdf_salt: &[u8], passphrase: &str) -> Vec<u8>
[src]
Derive fixed size key for given salt and passphrase
Trait Implementations
impl Clone for Kdf
[src]
fn clone(&self) -> Kdf
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Kdf
[src]
impl Debug for Kdf
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Kdf
[src]
fn eq(&self, __arg_0: &Kdf) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Kdf) -> bool
[src]
This method tests for !=
.
impl Eq for Kdf
[src]
impl Default for Kdf
[src]
impl From<KdfDepthLevel> for Kdf
[src]
fn from(sec: KdfDepthLevel) -> Self
[src]
Performs the conversion.
impl From<u32> for Kdf
[src]
impl From<(u32, u32, u32)> for Kdf
[src]
impl FromStr for Kdf
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
Parses a string s
to return a value of this type. Read more