pub enum HashAlgorithm {
    Md4,
    HmacMd4,
    Md5,
    Md5Version06,
    HmacMd5,
    HmacMd5Version06,
    Sha1,
    HmacSha1,
    Sha256,
    HmacSha256,
    Ripemd160,
    HmacRipemd160,
}
Expand description

The hash algorithm to use, as shown in the GUI of the JavaScript edition of PasswordMaker Pro.

Description

Most algorithms work by computing the hash of the input values and doing a number system base conversion to indices into the supplied character array. Notable exceptions are the HMAC algorithms, which not only compute the HMAC for the input, but also, before that, encode the input as UTF-16 and discard all upper bytes. The Md5Version06 variant is for compatibility with ancient versions of PasswordMaker Pro. Not only does it also do the conversion to UTF-16 and the discarding of the upper bytes, in addition it disregards the user-supplied character set completely, and instead just outputs the hash encoded as hexadecimal numbers. The HmacMd5Version06 is similarly ignoring the supplied characters and using hexadecimal numbers as output.

Variants§

§

Md4

Regular Md4 PasswordMaker Pro setting.

§

HmacMd4

HAMC Md4 PasswordMaker Pro setting. Encodes input as UTF-16 and discards upper byte (just as PasswordMaker Pro does for HMAC).

§

Md5

Regular Md5 PasswordMaker Pro setting.

§

Md5Version06

Md5 as computed by PasswordMaker Pro version 0.6. Encodes input as UTF-16 and discards upper byte and outputs MD5 as hex number.

§

HmacMd5

HMAC Md5 PasswordMaker Pro setting. Encodes input as UTF-16 and discards upper byte (just as PasswordMaker Pro does for HMAC).

§

HmacMd5Version06

HMAC Md5 as computed by PasswordMaker Pro version 0.6. Encodes input as UTF-16 and discards upper byte and outputs MD5 as hex number.

§

Sha1

Regular Sha1 PasswordMaker Pro setting.

§

HmacSha1

HAMC Sha1 PasswordMaker Pro setting. Encodes input as UTF-16 and discards upper byte (just as PasswordMaker Pro does for HMAC).

§

Sha256

Regular Sha256 PasswordMaker Pro setting.

§

HmacSha256

HAMC Sha256 PasswordMaker Pro setting. Encodes input as UTF-16 and discards upper byte (just as PasswordMaker Pro does for HMAC).

§

Ripemd160

Regular Ripemd160 PasswordMaker Pro setting.

§

HmacRipemd160

HAMC Ripemd160 PasswordMaker Pro setting. Encodes input as UTF-16 and discards upper byte (just as PasswordMaker Pro does for HMAC).

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

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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.