Versions in this module Expand all Collapse all v0 v0.1.0 Jul 23, 2026 Changes in this version + func Generate(opts GenerateOpts) (*otp.Key, error) + func GenerateCode(secret string, counter uint64) (string, error) + func GenerateCodeCustom(secret string, counter uint64, opts ValidateOpts) (string, error) + func GenerateCodeCustomRaw(secret []byte, counter uint64, opts ValidateOpts) (string, error) + func GenerateCodeUint32(secret string, counter uint64) (uint32, error) + func Validate(passcode string, counter uint64, secret string) bool + func ValidateCustom(passcode string, counter uint64, secret string, opts ValidateOpts) (bool, error) + func ValidateCustomRaw(passcode string, counter uint64, secret []byte, opts ValidateOpts) (bool, error) + type GenerateOpts struct + AccountName string + Algorithm otp.Algorithm + Digits otp.Digits + Issuer string + Rand io.Reader + Secret []byte + SecretSize uint + type ValidateOpts struct + Algorithm otp.Algorithm + Digits otp.Digits + Encoder otp.Encoder