mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-15 07:04:16 +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";
|
||||
|
||||
// Generate random data
|
||||
var rnd = new byte[length];
|
||||
using (var rng = new RNGCryptoServiceProvider())
|
||||
rng.GetBytes(rnd);
|
||||
var rnd = RandomNumberGenerator.GetBytes(length);
|
||||
|
||||
// Generate the output string
|
||||
var allowable = allowableChars.ToCharArray();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue