Documentation ¶
Index ¶
- func Create(issuer, accountName string, size int) (string, string, error)
- func CreateImage(url string, size int) (string, error)
- func CreateURL(issuer, accountName string) (string, string, error)
- func GenerateSecretKey(seed string) (string, error)
- func GenerateSeed() string
- func GetNewCode(secretKey string, curTimeSlice int64) uint32
- func SHA1(data []byte) []byte
- func SHA1PRNG(seed []byte, size int) ([]byte, error)
- func SHA512(data []byte) []byte
- func ValidCode(secretKey string, code uint32, size ...int) bool
- func Validate(code, secret string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNewCode ¶
* @生成code验证码 * @secretKey 密钥 * @curTimeSlice 当前时间戳 - time.Now().Unix()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.