16 lines
No EOL
365 B
C#
16 lines
No EOL
365 B
C#
using System.Security.Cryptography;
|
|
|
|
namespace IdentityShroud.Core.Security;
|
|
|
|
public static class RsaHelper
|
|
{
|
|
/// <summary>
|
|
/// Load RSA private key from PKCS#8 format
|
|
/// </summary>
|
|
public static RSA LoadFromPkcs8(byte[] pkcs8Key)
|
|
{
|
|
var rsa = RSA.Create();
|
|
rsa.ImportPkcs8PrivateKey(pkcs8Key, out _);
|
|
return rsa;
|
|
}
|
|
} |