Versions in this module Expand all Collapse all v1 v1.0.7 Sep 15, 2022 Changes in this version type Totp + func (otp *Totp) HashFunction() crypto.Hash + func (otp *Totp) NumDigits() int v1.0.6 Feb 16, 2020 Changes in this version + var ErrorLockDown = errors.New("The verification is locked down, because of too many trials") + var ErrorTokenMismatch = errors.New("tokens mismatch") + func BCryptRecoveryCodes(codes []string) ([]string, error) + func DecodeRecoveryCodes(codes string) []string + func EncodeRecoveryCodes(codes []string) string + func GenerateRecoveryCodes() ([]string, error) + func UseRecoveryCode(codes []string, inputCode string) ([]string, bool) + func ValidRecoveryCode(code string) bool + type Totp struct + func NewTOTP(account, issuer string, hash crypto.Hash, digits int) (*Totp, error) + func TOTPFromBytes(message []byte, issuer string) (*Totp, error) + func (otp *Totp) OTP() (string, error) + func (otp *Totp) QR() ([]byte, error) + func (otp *Totp) Secret() string + func (otp *Totp) ToBytes() ([]byte, error) + func (otp *Totp) Validate(userCode string) error