We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7e5993 commit 91d2fd6Copy full SHA for 91d2fd6
Extensions/Xtensive.Orm.Security/Cryptography/GenericHashingService.cs
@@ -31,7 +31,14 @@ public abstract class GenericHashingService : IHashingService
31
/// Gets the salt.
32
/// </summary>
33
/// <returns>The salt.</returns>
34
- protected byte[] GetSalt() => RandomNumberGenerator.GetBytes(SaltSize);
+ 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
42
43
/// <summary>
44
/// Computes the hash.
0 commit comments