Enum libpasta::hashing::Algorithm [] [src]

pub enum Algorithm {
    Single(Primitive),
    Nested {
        outer: Primitive,
        inner: Box<Algorithm>,
    },
}

libpasta password hashing algorithms can be nested, which is captured by this recursive enum.

Variants

A single instance of a password-hashing primitive.

The password-hashing algorithm is composed of nested primitives.

Fields of Nested

The outermost layer of the algorithm is a single primitive

The rest of the layers

Methods

impl Algorithm
[src]

Type-safe function to compute the hash of a password.

Computes the hash output for given password and salt.

Verifies the password, salt and hash are matching by recursively re-computing the hash and verifying the final value.

Test whether the current 'Algorithm` is sufficiently secure.

Copies self into a new Algorithm wrapped by outer

Moves self into a new Algorithm wrapped by outer

Trait Implementations

impl<'a> Serialize for Algorithm
[src]

Serialize this value into the given Serde serializer. Read more

impl Clone for Algorithm
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Algorithm
[src]

Formats the value using the given formatter.

impl PartialEq for Algorithm
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for Algorithm
[src]

Returns the "default value" for a type. Read more