Struct libpasta::hashing::Output
[−]
[src]
pub struct Output { pub alg: Algorithm, pub salt: Vec<u8>, pub hash: Vec<u8>, }
Represents the output of a password hashing algorithm.
Fields
alg: Algorithm
The algorithm used
salt: Vec<u8>
The salt
hash: Vec<u8>
The hash output
Methods
impl Output
[src]
fn verify(&self, password: Cleartext) -> bool
Verifies that the supplied password matches the hashed value.
Trait Implementations
impl<'de> Deserialize<'de> for Output
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Serialize for Output
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
S: Serializer,
Serialize this value into the given Serde serializer. Read more