Documentation ¶
Index ¶
Constants ¶
View Source
const ( HashAlgoSha1 = "SHA1" HashAlgoSha256 = "SHA256" HashAlgoSha512 = "SHA512" )
View Source
const TimeStepSizeDefault = 30
View Source
const TimeStepSizeMax = 31622400
View Source
const TimeStepSizeMin = 1
Variables ¶
This section is empty.
Functions ¶
func Totp ¶
Totp calculates time based one time password as described in RFC 6238.
Password is calculated based on secret, time, timeStepSize (in seconds, 30 is the recommended value, has to be in range of [1, 31622400]), hashing algorithm (SHA1, SHA256 and SHA512 are accepted) and digits (6, 7 or 8). Digits parameter also determines result password length.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.