Files
Toolkit2/Toolkit.Foundation/KeyGenerator.cs
T
2024-05-02 20:58:12 +01:00

16 lines
270 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;
}
}