Struct bonsaidb::local::argon2::Params[]

pub struct Params { /* fields omitted */ }
Expand description

Argon2 password hash parameters.

These are parameters which can be encoded into a PHC hash string.

Implementations

Default memory cost.

Minimum number of memory blocks.

Maximum number of memory blocks.

Default number of iterations (i.e. “time”).

Minimum number of passes.

Maximum number of passes.

Default degree of parallelism.

Minimum and maximum number of threads (i.e. parallelism).

Minimum and maximum number of threads (i.e. parallelism).

Maximum length of a key ID in bytes.

Maximum length of associated data in bytes.

Default output length.

Minimum digest size in bytes.

Maximum digest size in bytes.

Create new parameters.

Memory size, expressed in kilobytes, between 1 and (2^32)-1.

Value is an integer in decimal (1 to 10 digits).

Number of iterations, between 1 and (2^32)-1.

Value is an integer in decimal (1 to 10 digits).

Degree of parallelism, between 1 and 255.

Value is an integer in decimal (1 to 3 digits).

Key identifier: byte slice between 0 and 8 bytes in length.

Defaults to an empty byte slice.

Note this field is only present as a helper for reading/storing in the PHC hash string format (i.e. it is totally ignored from a cryptographical standpoint).

On top of that, this field is not longer part of the argon2 standard (see: https://github.com/P-H-C/phc-winner-argon2/pull/173), and should not be used for any non-legacy work.

Associated data: byte slice between 0 and 32 bytes in length.

Defaults to an empty byte slice.

This field is not longer part of the argon2 standard (see: https://github.com/P-H-C/phc-winner-argon2/pull/173), and should not be used for any non-legacy work.

Length of the output (in bytes).

Get the number of blocks required given the configured m_cost and p_cost.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

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

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more