public static Rsa Create(string key, int keySize = 1024) { Rsa rsa = new Rsa(keySize); rsa.ImportParametersFromXml(key); return(rsa); }
public static Rsa Create(RSAParameters parameters, int keySize = 1024) { Rsa rsa = new Rsa(keySize); rsa.rsaProvider.ImportParameters(parameters); return(rsa); }