13 lines
274 B
C#
13 lines
274 B
C#
using System.Security.Cryptography;
|
|
|
|
namespace RsaKeyLoader;
|
|
|
|
public class KeyLoader
|
|
{
|
|
public void Generate(string path)
|
|
{
|
|
var rsaKey = RSA.Create();
|
|
var privateKey = rsaKey.ExportRSAPrivateKey();
|
|
File.WriteAllBytes(path, privateKey);
|
|
}
|
|
} |