Konscious.Security.Cryptography icon indicating copy to clipboard operation
Konscious.Security.Cryptography copied to clipboard

Allow passwords of zero length

Open andreimilto opened this issue 5 years ago • 0 comments

Currently a password of zero length causes ArgumentException in the constructor:

public Argon2(byte[] password)
{
    if (password == null || password.Length == 0)
        throw new ArgumentException("Argon2 needs a password set", nameof(password));

    _password = password;
}

However, using a password of zero length as an input for Argon2 is an accepted practice:

So, it would be nice to see the support of zero-length passwords here.

andreimilto avatar Apr 11 '20 22:04 andreimilto