Therefore, this implementation buffers the entire input provided via update calls until finish is called. This may consume significant memory for very large inputs.
ddn.crypto.hash.argon2
Argon2 Password Hashing Scheme (RFC 9106).
Types 2
enumArgon2Type
Argon2 Variant.
ARGON2D = 0Argon2d: data-dependent addressing (side-channel exposed).
ARGON2I = 1Argon2i: data-independent addressing (password hashing).
ARGON2ID = 2Argon2id: hybrid - independent addressing for the first half of the first pass, dependent afterwards.
classArgon2Digest : Hash
Argon2 Digest Wrapper implementing Hash interface.
This class adapts the Argon2 PHS to the generic Hash interface. The input data fed via update is treated as the password. Salt and other parameters must be provided at construction.
Note
Argon2 requires the length of the password to be known at the start of the hashing process.
Methods
ubyte[] finish()void reset()void wipe() nothrow @nogc @trustedZeroizes all secret inputs retained by this digest (the password buffer, salt, secret, and associated data).Constructors
this(Argon2Type type, uint t, uint m, uint p, const(ubyte)[] salt, uint tagLength = 32,
const(ubyte)[] secret = null, const(ubyte)[] ad = null, int version_ = 0x13)Functions 1
fn
ubyte[] argon2(Argon2Type type, int version_, uint t, uint m, uint p,
const(ubyte)[] pwd, const(ubyte)[] salt,
const(ubyte)[] secret, const(ubyte)[] ad, uint tagLength)Argon2 Core Function.