Versions in this module Expand all Collapse all v0 v0.2.0 Nov 10, 2024 Changes in this version + func EncodeQuery(v url.Values) string + type Algorithm int + const MD5 + const SHA1 + const SHA256 + const SHA512 + func (a Algorithm) GetAlgorithm() (h func() hash.Hash) + func (a Algorithm) String() string + type Key struct + func (k *Key) Image(width int, height int) (image.Image, error) + type OpFunc func(t *Totp) + func WithAlgorithm(algorithm Algorithm) OpFunc + func WithExpiration(expiration int) OpFunc + func WithSecret(secret string) OpFunc + func WithSize(size int) OpFunc + type OtpUrl struct + Account string + Issuer string + func NewOtpUrl(issuer string, account string, totp *Totp) *OtpUrl + func (o *OtpUrl) GetUrl() (*Key, error) + type Totp struct + func NewTotp(ops ...OpFunc) *Totp + func (t *Totp) GeneratePwd() (pwd string, err error) + func (t *Totp) ValidatePwd(pwd string) (bool, error)