Beispiel #1
0
        public static byte[] smethod_0(this RSACryptoServiceProvider rsacryptoServiceProvider_0, byte[] byte_0)
        {
            if (byte_0 == null)
            {
                throw new ArgumentNullException("data");
            }
            if (rsacryptoServiceProvider_0.PublicOnly)
            {
                throw new InvalidOperationException("Private key is not loaded");
            }
            int num = rsacryptoServiceProvider_0.KeySize / 8 - 6;

            if (byte_0.Length > num)
            {
                throw new ArgumentOutOfRangeException("data", string.Format("Maximum data length for the current key size ({0} bits) is {1} bytes (current length: {2} bytes)", rsacryptoServiceProvider_0.KeySize, num, byte_0.Length));
            }
            BigInteger    value         = GClass881.smethod_2(GClass881.smethod_3(byte_0));
            RSAParameters rsaparameters = rsacryptoServiceProvider_0.ExportParameters(true);
            BigInteger    exponent      = GClass881.smethod_2(rsaparameters.D);
            BigInteger    modulus       = GClass881.smethod_2(rsaparameters.Modulus);

            return(BigInteger.ModPow(value, exponent, modulus).ToByteArray());
        }