Exemplo n.º 1
0
 public static Integer CalculateSecretExponent(Integer exponent, Integer phi)
 => Integer.GetModInverse(exponent, phi);
Exemplo n.º 2
0
        public void IntegerShouldModInverseCorrectly(string first, string second, string expected)
        {
            var result = Integer.GetModInverse(new Integer(first), new Integer(second)).ToString();

            Assert.AreEqual(expected, result);
        }