Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptSeed ¶
DecryptSeed decrypts the base32 encoded encrypted seed with the user's password as key. Reversing the EncryptSeed() we use AES-128 bit encryption and the key is generated by using the user's password as much as needed. The end result is the TOTP seed
func EncryptSeed ¶
EncryptSeed encrypts the seed with the user's password as key We use AES-128 bit encryption so we reuse the user's password as much as needed. The end result is Base32 encoded and will be appended to the hashed password in the configuration file
func GenerateOTPCode ¶
GenerateOTPCode calculates a code as defined in rfc6238 using the seed and a specific time the settings are hardcoded to what is most commonly used: 30 seconds window (the code changes every 30 seconds) generated code is 6 digits long the HMAC is using SHA1
func GenerateSeed ¶
func GenerateSeed() string
GenerateSeed creates a random 16 byte Base32 string that serves as OTP Seed
func ProvisionURI ¶
ProvisionURI creates an otpauth URI commonly used by mobile phone authenticator applications
Types ¶
This section is empty.