Struct orion::kdf::Password

source ·
pub struct Password { /* private fields */ }
Expand description

A type to represent the Password that PBKDF2 hashes and uses for key derivation.

Exceptions:

An exception will be thrown if:

  • slice is empty.

Security:

  • Avoid using unprotected_as_bytes() whenever possible, as it breaks all protections that the type implements.

Implementations§

Make an object from a given byte slice.

Return the object as byte slice. Warning: Should not be used unless strictly needed. This breaks protections that the type implements.

Return the length of the object.

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.