Skip to content

czxichen/otpauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

谷歌otpauth验证器

Install

go get -v github.com/czxichen/otpauth

Example

package main

import (
    "fmt"

    "github.com/czxichen/otpauth"
)

func main() {
    str := otpauth.GenerateOTP("Di", "[email protected]")

    fmt.Printf("OTPAUTH字符串: %s\n",str)

    if otpauth.CompareCode(3, 865946, "MNTIZ73RIWUUO2PJ") {
        fmt.Println("Verification Pass!")
    } else {
        fmt.Println("Verification Faild!")
    }
}

About

OTPAUTH,Google动态码

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages