Open tg24 opened 3 years ago
I have also noticed this issue using a different set of configurations:
var res = new Argon2Config
{
Type = Argon2Type.DataIndependentAddressing,
Password = Encoding.UTF8.GetBytes(GetValidStringFromInput(input)),
Salt = DeriveSaltFromContent(input, argonVer),
ClearPassword = true,
ClearSecret = true,
};
with the usage example:
SecureArray<byte> res = null;
using (var hasher = new Argon2(config))
res = hasher.Hash();`
From time to time I've got an OutOfMemoryException when doing the following in version 1.1.10 (November, 18th 2020):
var argon2A = new Argon2(config);
My configuration looks like this:
The exception states the following:
Failed to allocate 16777216-byte Argon2 block array, memory cost 131072, lane count 4.
The exception occurs sporadically but it's not comprehensible in which situation. Since it is an x86 application I thought it's about the memory consumption of my application but i've doublechecked this - it's just around 600MB. If I'm going to decrease the memory cost at some point it works.