Documentation
¶
Index ¶
- func Generate(opts GenerateOpts) (*otp.Key, error)
- func GenerateCode(secret string, t time.Time) (string, error)
- func GenerateCodeCustom(secret string, t time.Time, opts Options) (passcode string, err error)
- func Validate(passcode string, secret string) bool
- func ValidateCustom(passcode string, secret string, t time.Time, opts Options) (bool, error)
- type GenerateOpts
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCode ¶
GenerateCode 使用默认配置生成TOTP密码
func GenerateCodeCustom ¶
GenerateCodeCustom 使用自定义配置生成TOTP密码
Types ¶
Click to show internal directories.
Click to hide internal directories.