Documentation
¶
Index ¶
- func Generate(opts GenerateOpts) (*otp.Key, error)
- func GenerateCode(secret string, counter uint64) (string, error)
- func GenerateCodeCustom(secret string, counter uint64, opts Options) (passcode string, err error)
- func Validate(passcode string, counter uint64, secret string) bool
- func ValidateCustom(passcode string, counter uint64, secret string, opts Options) (bool, error)
- type GenerateOpts
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCode ¶
GenerateCode 使用默认配置生成一次性密码
func GenerateCodeCustom ¶
GenerateCodeCustom 生成一个HOTP密码
Types ¶
Click to show internal directories.
Click to hide internal directories.