Exemplo n.º 1
0
        /// <summary> Create RSAPrivateKey with the provided key </summary>
        public RSAPrivateKey(RSAParameters keyInfo)
            : this(new RSACryptoServiceProvider())
        {
            Check.NotNull(keyInfo);
            Check.NotNull(keyInfo.D);
            Check.NotNull(keyInfo.DP);
            Check.NotNull(keyInfo.DQ);
            Check.NotNull(keyInfo.Exponent);
            Check.NotNull(keyInfo.InverseQ);
            Check.NotNull(keyInfo.Modulus);
            Check.NotNull(keyInfo.P);
            Check.NotNull(keyInfo.Q);

            RSAKey.ImportParameters(keyInfo);
        }