xgoogauth

package
v0.2.90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: BSD-3-Clause-Clear Imports: 8 Imported by: 0

Documentation

Overview

谷歌密钥生成操作

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(secret string) string

根据秘钥获取随机数字验证码

secret	秘钥标识

func Qrstring

func Qrstring(user, secret string) string

获取生成二维码的规范化字符串

user	标题
secret	秘钥

返回格式:otpauth://totp/<user>?secret=<secret>

func Regedit

func Regedit(c *Config)

注册配置项

func Secret

func Secret() string

生成秘钥

func Verify

func Verify(secret, code string) bool

验证输入的验证码是否正确

secret	秘钥
code	用户输入的验证码

Types

type Config

type Config struct {
	LogErrorFunc func(msg string, err error) // 日志导出函数
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL