Ejemplo n.º 1
0
        public void HotpAppendixDTests(Rfc4226AppendixDData data)
        {
            Assert.IsNotNull(data, "data was null");
            Hotp hotpCalculator = new Hotp(RfcTestKey);
            var  hotp           = hotpCalculator.ComputeHotp(data.Counter);

            Assert.AreEqual(data.Hotp, hotp);
        }
Ejemplo n.º 2
0
        public void OtpAppendixDTests(Rfc4226AppendixDData data)
        {
            Assert.IsNotNull(data, "data was null");

            Hotp hotpCalculator = new Hotp(RfcTestKey);
            var  otp            = hotpCalculator.ComputeHotpDecimal(data.Counter, OtpHashMode.Sha1);

            Assert.AreEqual(data.Decimal, otp);
        }