Struct tor_hash_passwd::EncryptedKey[][src]

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

A representation of a Tor hashed pssword. See the module docs for more details and examples.

Implementations

Generate a hashed password using the given secret password. The result is random because the algorithm uses an 8-byte random salt.

Generate a hashed password using the given secret password and the supplied salt. The result is deterministic.

Checks to see if the given password matches this hashed password

Returns the salt portion of the hashed password

Returns the indicator (always 0x60 in current Tor version)

Returns the hash portion of the hashed password

Returns the hashed password prefix (always “16” for now)

Tries to create an EncryptedKey instance from the string-like reference.

Trait Implementations

Formats the value using the given formatter. 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.

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

Performs the conversion.

Performs the conversion.

Converts the given value to a String. 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.