Exemple #1
0
        public byte[] Decrypt <T>(T data, bool isBigEndian = false)
        {
            if (this.isDecryptionInitialized)
            {
                goto IL_2C;
            }
IL_08:
            int arg_12_0 = 239526367;

IL_0D:
            BigInteger bigInteger;

            switch ((arg_12_0 ^ 1966150740) % 4)
            {
            case 0:
IL_2C:
                bigInteger = BigInteger.ModPow(data.ToBigInteger(isBigEndian), this.e, this.n);
                arg_12_0   = 1511172245;
                goto IL_0D;

            case 2:
                goto IL_08;

            case 3:
                throw RsaCrypt.smethod_0(Module.smethod_35 <string>(280647186u));
            }
            return(bigInteger.ToByteArray());
        }
Exemple #2
0
        public byte[] Encrypt <T>(T data, bool isBigEndian = false)
        {
            if (!this.isEncryptionInitialized)
            {
                goto IL_36;
            }
            goto IL_82;
            uint       arg_5D_0;
            BigInteger bigInteger;

            while (true)
            {
IL_58:
                uint num;
                switch ((num = (arg_5D_0 ^ 679079837u)) % 6u)
                {
                case 0u:
                    bigInteger = this.p + bigInteger;
                    arg_5D_0   = (num * 1985006744u ^ 19782673u);
                    continue;

                case 1u:
                    goto IL_EC;

                case 3u:
                    goto IL_82;

                case 4u:
                    goto IL_36;

                case 5u:
                    arg_5D_0 = (((bigInteger.Sign == -1) ? 4028650168u : 2508738494u) ^ num * 699542497u);
                    continue;
                }
                break;
            }
            goto IL_FC;
IL_EC:
            throw RsaCrypt.smethod_0(Module.smethod_33 <string>(232536431u));
IL_FC:
            BigInteger bigInteger2;

            return((bigInteger2 + bigInteger * this.q).ToByteArray());

IL_36:
            arg_5D_0 = 1134742188u;
            goto IL_58;
IL_82:
            BigInteger expr_89 = data.ToBigInteger(isBigEndian);
            BigInteger left = BigInteger.ModPow(expr_89 % this.p, this.dp, this.p);

            bigInteger2 = BigInteger.ModPow(expr_89 % this.q, this.dq, this.q);
            bigInteger  = this.iq * (left - bigInteger2) % this.p;
            arg_5D_0    = 1070365730u;
            goto IL_58;
        }