Struct argon2rs::verifier::Encoded [] [src]

pub struct Encoded { /* fields omitted */ }

Represents a single Argon2 hashing session. A hash session comprises of the hash algorithm parameters, salt, key, and data used to hash a given input.

Methods

impl Encoded
[src]

Reconstruct a previous hash session from serialized bytes.

Serialize this hashing session into raw bytes that can later be recovered by Encoded::from_u8.

Generates a new hashing session from password, salt, and other byte input. Parameters are:

argon: An Argon2 struct representative of the desired hash algorithm parameters.

p: Password input.

s: Salt.

k: An optional secret value.

x: Optional, miscellaneous associated data.

Note that p, s, k, x must conform to the same length constraints dictated by Argon2::hash.

Same as Encoded::new, but with the default Argon2i hash algorithm parameters.

Same as Encoded::new, but with the default Argon2d hash algorithm parameters.

Verifies password input against the hash that was previously created in this hashing session.

Provides read-only access to the Argon2 parameters of this hash.