package
1.1.0
Repository: https://github.com/infinilabs/framework.git
Documentation: pkg.go.dev

# Functions

GenerateOTP return one time password or an error if occurs The function compliant with RFC 4226, and implemented as mentioned in section 5.3 See https://tools.ietf.org/html/rfc4226#section-5.3.
GenerateSecret return base32 random generated secret.
New return's new Verifier, with defaults values.
NewKey return's new Key.
NewKeyFromRaw return's key from raw string.

# Constants

EightDigits of OTP.
HOTP represents hotp, defined in RFC 4266.
SHA1 represents the SHA1 algorithm name.
SHA256 represents the SHA256 algorithm name.
SHA512 represents the SHA512 algorithm name.
SixDigits of OTP.
TOTP represents totp, defined in RFC 6238.

# Variables

ErrMaxAttempts is returned by Verifier, When the verification failures count equal the max attempts.
ErrWeakSecretSize is returned by GenerateSecret, when input secret size does not meet RFC 4226 requirements.

# Structs

Key represnt Uri Format for OTP See https://github.com/google/google-authenticator/wiki/Key-Uri-Format.
Verifier represents one-time password verification for both HOTP and TOTP.

# Type aliases

Digits represents the length of OTP.
HashAlgorithm represents the hashing function to use in the HMAC.
Type represent OTP type (TOTP, HOTP).
VerificationDisabledError is returned by Verifier when the password verification process disabled for a period of time.