mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-22 19:49:17 +01:00
Replace obsolete rng call with RandomNumberGenerator.GetBytes
This commit is contained in:
parent
08c3bbde3c
commit
2f281f366b
1 changed files with 1 additions and 3 deletions
|
|
@ -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();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue