Skip to content

Commit 91d2fd6

Browse files
committed
Fix build for net5.0
1 parent d7e5993 commit 91d2fd6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Extensions/Xtensive.Orm.Security/Cryptography/GenericHashingService.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ public abstract class GenericHashingService : IHashingService
3131
/// Gets the salt.
3232
/// </summary>
3333
/// <returns>The salt.</returns>
34-
protected byte[] GetSalt() => RandomNumberGenerator.GetBytes(SaltSize);
34+
protected byte[] GetSalt()
35+
{
36+
var salt = new byte[SaltSize];
37+
using (var rng = RandomNumberGenerator.Create()) {
38+
rng.GetBytes(salt);
39+
return salt;
40+
}
41+
}
3542

3643
/// <summary>
3744
/// Computes the hash.

0 commit comments

Comments
 (0)