enum Mode [src]
Argon2 type
Fields
argon2dArgon2d is faster and uses data-depending memory access, which makes it highly resistant
against GPU cracking attacks and suitable for applications with no threats from side-channel
timing attacks (eg. cryptocurrencies).
argon2iArgon2i instead uses data-independent memory access, which is preferred for password
hashing and password-based key derivation, but it is slower as it makes more passes over
the memory to protect from tradeoff attacks.
argon2idArgon2id is a hybrid of Argon2i and Argon2d, using a combination of data-depending and
data-independent memory accesses, which gives some of Argon2i's resistance to side-channel
cache timing attacks and much of Argon2d's resistance to GPU cracking attacks.
Source
pub const Mode = enum {
/// Argon2d is faster and uses data-depending memory access, which makes it highly resistant
/// against GPU cracking attacks and suitable for applications with no threats from side-channel
/// timing attacks (eg. cryptocurrencies).
argon2d,
/// Argon2i instead uses data-independent memory access, which is preferred for password
/// hashing and password-based key derivation, but it is slower as it makes more passes over
/// the memory to protect from tradeoff attacks.
argon2i,
/// Argon2id is a hybrid of Argon2i and Argon2d, using a combination of data-depending and
/// data-independent memory accesses, which gives some of Argon2i's resistance to side-channel
/// cache timing attacks and much of Argon2d's resistance to GPU cracking attacks.
argon2id,
}