GenericHash.HashSaltPersonal issue
Closed this issue · 1 comments
DBenS commented
Although the code allows using GenericHash.HashSaltPersonal with a NULL key, the "HashSaltPersonal" procedure checks the key against "MIN_SIZE", which causes a function to refuse to work and causes .NET 4.8 compatibility issue.
if (key == null)
key = Array.Empty<byte>();
if (key.Length > KEY_BYTES_MAX || key.Length < KEY_BYTES_MIN)
throw new KeyOutOfRangeException(nameof(key), key?.Length ?? 0, $"key must be between {KEY_BYTES_MIN} and {KEY_BYTES_MAX} bytes in length.");