C# 클래스 Albireo.Otp.Hotp

HMAC-based one-time password algorithm implementation.
파일 보기 프로젝트 열기: kappa7194/otp

공개 메소드들

메소드 설명
GetCode ( HashAlgorithm algorithm, string secret, long counter, int digits = Otp.DefaultDigits ) : int

Compute the one-time code for the given parameters.

GetKeyUri ( HashAlgorithm algorithm, string issuer, string account, byte secret, long counter, int digits = Otp.DefaultDigits ) : string

Build a URI for secret key provisioning.

메소드 상세

GetCode() 공개 정적인 메소드

Compute the one-time code for the given parameters.
public static GetCode ( HashAlgorithm algorithm, string secret, long counter, int digits = Otp.DefaultDigits ) : int
algorithm HashAlgorithm The hashing algorithm for the HMAC computation.
secret string The ASCII-encoded base32-encoded shared secret.
counter long The counter for which the one-time code must be computed.
digits int The number of digits of the one-time code.
리턴 int

GetKeyUri() 공개 정적인 메소드

Build a URI for secret key provisioning.
public static GetKeyUri ( HashAlgorithm algorithm, string issuer, string account, byte secret, long counter, int digits = Otp.DefaultDigits ) : string
algorithm HashAlgorithm The hashing algorithm for the HMAC computation.
issuer string The name of the entity issuing and maintaining the key.
account string The account name for which the one-time codes will work.
secret byte The ASCII-encoded base32-encoded shared secret.
counter long The initial value for the counter.
digits int The number of digits of the one-time codes.
리턴 string