Files
Toolkit2/Toolkit.Foundation/KeyGenerator.cs
T
TheXamlGuy c0c1a82846 Codemaid
2024-05-24 08:21:50 +01:00

15 lines
268 B
C#

using System.Security.Cryptography;
namespace Toolkit.Foundation;
public class KeyGenerator :
IKeyGenerator
{
public byte[] Generate(int size)
{
byte[] key = new byte[size];
RandomNumberGenerator.Fill(key);
return key;
}
}