This commit is contained in:
2024-10-13 01:02:51 +07:00
parent 572ec9b033
commit a934952816
10 changed files with 171 additions and 0 deletions

5
RsaKeyLoader/Class1.cs Normal file
View File

@@ -0,0 +1,5 @@
namespace RsaKeyLoader;
public class Class1
{
}

13
RsaKeyLoader/KeyLoader.cs Normal file
View File

@@ -0,0 +1,13 @@
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);
}
}

View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>