using System.Security.Cryptography; namespace DigitalData.Core.Security.Extensions { public static class RSAExtensions { public static RSA ToRSA(this string pem) { var rsa = RSA.Create(); rsa.ImportFromPem(pem); return rsa; } } }