Пример #1
0
        public void Mod_Test()
        {
            var val      = new Natural(52);
            var exponent = new Natural(7);
            var modulo   = new Natural(3);
            var expected = BigInteger.ModPow(52, 7, 3);

            var actual = val.ModPow(exponent, modulo);

            Assert.AreEqual(expected, actual.GetBigValue());

            Console.WriteLine("The value of expected {0} vs actual: " + actual.GetBigValue(), expected);
        }