Dec 14, 2021

golang OTP just simple play

1. main package : https://github.com/xlzd/gotp package main import ( "fmt" "time" "github.com/xlzd/gotp" ) func main() { totp := gotp.NewDefaultTOTP("4S62BZNFXXSZLCRO") // ini cara create paling simple // klo mau custom bs pake gotp.NewTOTP(secret, 6, 30, nil) secret=string, 6=digits, 30=interval in second code := totp.Now() mytime := int(30 - time.Now().Unix()%30) unixtime := int(time.Now().Unix()) fmt.Println("pertama...
Read more ...