Versions in this module Expand all Collapse all v1 v1.0.1 Aug 20, 2021 Changes in this version + var ErrInvalidAlgorithm = Error + var ErrSecretTooShort = Error + type Algorithm uint + const SHA1 + const SHA256 + const SHA512 + type Error struct + Cause error + ID uint64 + func (e Error) Error() string + func (e Error) Is(target error) bool + func (e Error) Unwrap() error + func (e Error) Wrap(err error) Error + type TOTP interface + Check func(token string, time time.Time) (valid bool, err error) + Generate func(time time.Time) (token string, err error) + Qr func(label, issuer string) (base64 string, err error) + Secret func() string + Sign func(time time.Time) ([]byte, error) + Url func(label, issuer string) (url string, err error) + func New(algorithm Algorithm, digits, skew uint, step uint64, secret []byte) (TOTP, error)