Struct libpasta::primitives::Scrypt
[−]
[src]
pub struct Scrypt { /* fields omitted */ }
Struct holding scrypt
parameters.
This implementation is backed by ring_pwhash
.
Methods
impl Scrypt
[src]
fn default() -> Primitive
Gets the default scrypt instance.
fn new(log_n: u8, r: u32, p: u32) -> Primitive
Create a new scrypt instance.
fn from_bytes(bytes: [u8; 9]) -> Primitive
Create a new Scrypt instance from an array of bytes, the compact format used by scrypt.
Trait Implementations
impl PrimitiveImpl for Scrypt
[src]
fn compute<'a>(&'a self, password: &[u8], salt: &[u8]) -> Vec<u8>
Compute the scrypt hash
fn params_as_vec(&self) -> Vec<(&'static str, String)>
Convert parameters into a vector of (key, value) tuples for serializing.
fn hash_id(&self) -> Hashes
Return algorithm type as a MCF-compatible hash identifier.
fn verify(&self, password: &[u8], salt: &[u8], hash: &[u8]) -> bool
Verify the password and salt against the hash. Read more