Versions in this module Expand all Collapse all v1 v1.2.0 Nov 11, 2023 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) (passcode string, err error) + func Validate(passcode string, counter uint64, secret string) bool + func ValidateCustom(passcode string, counter uint64, secret string, 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