Documentation
¶
Overview ¶
stolen from: https://github.com/yitsushi/totp-cli/blob/8eb8d7cac1284c57a1416996fb0b5d0c9e002923/internal/security/otp.go
Index ¶
Constants ¶
View Source
const ( // DefaultLength is the default length of the generated OTP code. DefaultLength = 6 // DefaultTimePeriod is the default time period for the TOTP. DefaultTimePeriod = 30 )
Variables ¶
This section is empty.
Functions ¶
func GenerateSecret ¶
func GenerateTOTPCode ¶
func GenerateTOTPCode(opts GenerateOptions) (string, int64, error)
GenerateOTPCode generates an N digit TOTP from the secret Token.
Types ¶
Click to show internal directories.
Click to hide internal directories.