C# Класс Albireo.Otp.Totp

Time-based one-time password algorithm implementation.
Показать файл Открыть проект

Открытые методы

Метод Описание
GetCode ( HashAlgorithm algorithm, string secret, System.DateTime datetime, int digits = Otp.DefaultDigits, int period = Totp.DefaultPeriod ) : int

Compute the one-time code for the given parameters.

GetKeyUri ( HashAlgorithm algorithm, string issuer, string account, byte secret, int digits = Otp.DefaultDigits, int period = Totp.DefaultPeriod ) : 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, System.DateTime datetime, int digits = Otp.DefaultDigits, int period = Totp.DefaultPeriod ) : int
algorithm HashAlgorithm The hashing algorithm for the HMAC computation.
secret string The ASCII-encoded base32-encoded shared secret.
datetime System.DateTime The date with time for which the one-time code must be computed.
digits int The number of digits of the one-time codes.
period int The period step used for the HMAC counter computation.
Результат int

GetKeyUri() публичный статический Метод

Build a URI for secret key provisioning.
public static GetKeyUri ( HashAlgorithm algorithm, string issuer, string account, byte secret, int digits = Otp.DefaultDigits, int period = Totp.DefaultPeriod ) : 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.
digits int The number of digits of the one-time codes.
period int The period step for the HMAC counter computation.
Результат string