otplib-core/totpSecret

Conversion of secret to buffer for TOTP

Seed for HMAC-SHA1 - 20 bytes Seed for HMAC-SHA256 - 32 bytes Seed for HMAC-SHA512 - 64 bytes

Source:
Parameters:
Name Type Description
secret string

your secret that is used to generate the token

options.algorithm string

hmac algorithm

options.encoding string

the encoding of secret

Returns:
Type:
object