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).
enum Argon2Type
class Argon2Digest
Types 2
enumArgon2Type
Argon2 Variant.
Argon2d = 0
Argon2i = 1
Argon2id = 2
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.
Fields
private Argon2Type _typeprivate int _versionprivate uint _tprivate ubyte[] _saltprivate ubyte[] _secretprivate ubyte[] _adprivate uint _tagLengthprivate Appender!(ubyte[]) _bufferConstructors
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 9
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.private fn
uint computeReference(ulong j1, ulong j2, uint pass, uint slice, uint index, uint segmentLength, uint laneLength, uint l, uint p)private fn
uint computeReferenceArgon2i(uint pass, uint l, uint slice, uint idx, uint m_prime, uint t, Argon2Type type, uint laneLength, uint segmentLength)