13 lines
296 B
C#
13 lines
296 B
C#
using System.Security.Cryptography;
|
|
|
|
namespace Nerfed.Runtime.Util;
|
|
|
|
public static class RandomId
|
|
{
|
|
public static uint GenerateSecureRandomUInt()
|
|
{
|
|
byte[] buffer = new byte[4];
|
|
RandomNumberGenerator.Fill(buffer);
|
|
return BitConverter.ToUInt32(buffer, 0);
|
|
}
|
|
} |