Versions in this module Expand all Collapse all v0 v0.1.1 Dec 23, 2023 Changes in this version + func GenerateCode(secret string, t time.Time) (passcode string, err error) + func GenerateCodeCustom(secret string, t time.Time, opts ValidateOpts) (passcode string, err error) + func GenerateTotpKey(opts GenerateOpts) (key *gotp.Key, err error) + func ValidateCode(passcode string, secret string) bool + func ValidateCodeCustom(passcode string, secret string, t time.Time, opts ValidateOpts) (result bool, err error) + type GenerateOpts struct + AccountName string + Algorithm gotp.Algorithm + Digits gotp.Digits + Issuer string + Period uint + Rand io.Reader + Secret []byte + SecretSize uint + type ValidateOpts struct + Algorithm gotp.Algorithm + Digits gotp.Digits + Period uint + Window uint