GenerateOtp() public méthode

Generates the OTP for the given counter value. The client and server compute this independently and come up with the same result, provided they use the same shared key.
public GenerateOtp ( int counter ) : string
counter int The counter value to use.
Résultat string
 private void TestSHA1AndAssert(Key key, int digits, int counter, string expected)
 {
     var otp = new CounterBasedOtpGenerator(key, digits, new SHA1HMACAlgorithm());
     var result = otp.GenerateOtp(counter);
     Assert.AreEqual(expected, result);
 }
 private string GetOtpWithImplicitHMAC(Key key, int digits, int counter)
 {
     var otp = new CounterBasedOtpGenerator(key, digits);
     return otp.GenerateOtp(counter);
 }