Replace obsolete rng call with RandomNumberGenerator.GetBytes
This commit is contained in:
@@ -133,9 +133,7 @@ namespace MareSynchronosServer.Hubs
|
|||||||
allowableChars = @"ABCDEFGHJKLMNPQRSTUVWXYZ0123456789";
|
allowableChars = @"ABCDEFGHJKLMNPQRSTUVWXYZ0123456789";
|
||||||
|
|
||||||
// Generate random data
|
// Generate random data
|
||||||
var rnd = new byte[length];
|
var rnd = RandomNumberGenerator.GetBytes(length);
|
||||||
using (var rng = new RNGCryptoServiceProvider())
|
|
||||||
rng.GetBytes(rnd);
|
|
||||||
|
|
||||||
// Generate the output string
|
// Generate the output string
|
||||||
var allowable = allowableChars.ToCharArray();
|
var allowable = allowableChars.ToCharArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user