Aetheria/Assets/Scripts/ServerShared/NIH/RethinkDb.Driver/Net/SecureRandom.cs

20 lines
404 B
C#
Raw Normal View History

using System;
using System.Security.Cryptography;
namespace RethinkDb.Driver.Net
{
internal class SecureRandom : IDisposable
{
private RandomNumberGenerator random = RandomNumberGenerator.Create();
public void GetBytes(byte[] data)
{
random.GetBytes(data);
}
public void Dispose()
{
random.Dispose();
}
}
}