Enum passwordmaker_rs::HashAlgorithm
source · 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§
source§impl Clone for HashAlgorithm
impl Clone for HashAlgorithm
source§fn clone(&self) -> HashAlgorithm
fn clone(&self) -> HashAlgorithm
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more