switch to shared random for GenerateCheapGuid

main
Nightshade System 4 weeks ago
parent 7c71c7effb
commit 408989d83a

@ -16,9 +16,8 @@ public class Utils
// This game is wonderful and working on it is even more so // This game is wonderful and working on it is even more so
public static string GenerateCheapGuid() public static string GenerateCheapGuid()
{ {
var rng = new Random();
var bytes = new byte[8]; var bytes = new byte[8];
rng.NextBytes(bytes); Random.Shared.NextBytes(bytes);
return Convert.ToHexStringLower(bytes); return Convert.ToHexStringLower(bytes);
} }
} }
Loading…
Cancel
Save