C# 클래스 OathNet.CounterBasedOtpGenerator

Implements the OATH HOTP algorithm.
파일 보기 프로젝트 열기: jennings/OATH.Net 1 사용 예제들

공개 메소드들

메소드 설명
CounterBasedOtpGenerator ( Key secretKey, int otpLength ) : System

Initializes a new instance of the CounterBasedOtpGenerator class. This is used when the client and server share a counter value.

CounterBasedOtpGenerator ( Key secretKey, int otpLength, IHMACAlgorithm hmacAlgorithm ) : System

Initializes a new instance of the CounterBasedOtpGenerator class. This is used when the client and server share a counter value.

GenerateOtp ( int counter ) : string

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.

메소드 상세

CounterBasedOtpGenerator() 공개 메소드

Initializes a new instance of the CounterBasedOtpGenerator class. This is used when the client and server share a counter value.
public CounterBasedOtpGenerator ( Key secretKey, int otpLength ) : System
secretKey Key The secret key.
otpLength int The number of digits in the OTP to generate.
리턴 System

CounterBasedOtpGenerator() 공개 메소드

Initializes a new instance of the CounterBasedOtpGenerator class. This is used when the client and server share a counter value.
public CounterBasedOtpGenerator ( Key secretKey, int otpLength, IHMACAlgorithm hmacAlgorithm ) : System
secretKey Key The secret key.
otpLength int The number of digits in the OTP to generate.
hmacAlgorithm IHMACAlgorithm The hashing algorithm to use.
리턴 System

GenerateOtp() 공개 메소드

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.
리턴 string