Documentation ¶
Index ¶
- func GenerateCode(domain, userName string, size int) ([]byte, string, error)
- func GenerateCodeAndSecret(domain, userName string, size int) ([]byte, string, error)
- func GenerateKey(domain, userName string) (string, error)
- func GenerateSecret(domain, userName string) (string, error)
- func GenerateUrlAndSecret(domain, userName string) (string, string, error)
- func Validate(url, code string) (bool, error)
- func ValidateCode(secret, code string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCode ¶
GenerateCode 生成2FA 二维码图片和 qrcode text
func GenerateCodeAndSecret ¶
GenerateCodeAndSecret 生成2FA 二维码图片和 secret
func GenerateKey ¶
GenerateKey 生成2FA qrcode text
func GenerateSecret ¶
GenerateSecret 生成2FA secret
func GenerateUrlAndSecret ¶
GenerateUrlAndSecret 生成2FA qrcode text 和 secret
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.