예제 #1
0
        public static Rsa Create(string key, int keySize = 1024)
        {
            Rsa rsa = new Rsa(keySize);

            rsa.ImportParametersFromXml(key);
            return(rsa);
        }
예제 #2
0
        public static Rsa Create(RSAParameters parameters, int keySize = 1024)
        {
            Rsa rsa = new Rsa(keySize);

            rsa.rsaProvider.ImportParameters(parameters);
            return(rsa);
        }