Documentation
¶
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 CheckPasswordConfirm ¶ added in v1.5.1
CheckPasswordConfirm checks two byte array if the content is the same.
func GenerateOTPCode ¶
func GenerateOTPCode(opts GenerateOptions) (string, int64, error)
GenerateOTPCode generates an N digit TOTP from the secret Token.
func UnsecureSHA1 ¶
UnsecureSHA1 is not secure, but makes a fixed length password. With v2, I'm planning to move away from it, but that would break all existing vaults, so I have to be careful and make sure a proper migration script/function exists.
Types ¶
Click to show internal directories.
Click to hide internal directories.