Creates an HOTP object.
Optional
config: {Configuration options.
Optional
algorithm?: stringHMAC hashing algorithm.
Optional
counter?: numberInitial counter value.
Optional
digits?: numberToken length.
Optional
issuer?: stringAccount provider.
Optional
issuerInLabel?: booleanInclude issuer prefix in label.
Optional
label?: stringAccount label.
Optional
secret?: string | SecretSecret key.
HMAC hashing algorithm.
Initial counter value.
Token length.
Account provider.
Include issuer prefix in label.
Account label.
Secret key.
Static
defaultsDefault configuration.
Static
generateGenerates an HOTP token.
Token.
Static
validateValidates an HOTP token.
Configuration options.
Optional
algorithm?: stringHMAC hashing algorithm.
Optional
counter?: numberCounter value.
Optional
digits?: numberToken length.
Secret key.
Token value.
Optional
window?: numberWindow of counter values to test.
Token delta or null if it is not found in the search window, in which case it should be considered invalid.
HOTP: An HMAC-based One-time Password Algorithm.
See
RFC 4226