Struct libpasta::primitives::Bcrypt
[−]
[src]
pub struct Bcrypt { /* fields omitted */ }
bcrypt
parameter set.
Holds the cost value.
This implementation is backed by rust-crypto
.
Methods
impl Bcrypt
[src]
fn new(cost: u32) -> Primitive
Construct a new Bcrypt
parameter set.
fn default() -> Primitive
Get the default Bcrypt
parameter set.
Trait Implementations
impl Clone for Bcrypt
[src]
fn clone(&self) -> Bcrypt
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PrimitiveImpl for Bcrypt
[src]
fn compute<'a>(&'a self, password: &[u8], salt: &[u8]) -> Vec<u8>
Compute the output of the primitive with input password
and salt
.
fn params_as_vec(&self) -> Vec<(&'static str, String)>
Output the parameters of the primitive as a list of tuples.
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