From 7881b6fdfc6aee00e3a7aab3610a7514de17da79 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 24 Apr 2014 20:40:44 -0600 Subject: [PATCH] Remove test TOTP client. --- totpc/totpc.go | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 totpc/totpc.go diff --git a/totpc/totpc.go b/totpc/totpc.go deleted file mode 100644 index 1c86f92..0000000 --- a/totpc/totpc.go +++ /dev/null @@ -1,43 +0,0 @@ -package main - -import ( - "fmt" - "github.com/gokyle/twofactor" - "io/ioutil" - "time" -) - -func main() { - otp := twofactor.GenerateGoogleTOTP() - if otp == nil { - fmt.Println("totpc: failed to generate token") - return - } - - qr, err := otp.QR("totpc-demo") - if err != nil { - fmt.Println(err.Error()) - return - } - - err = ioutil.WriteFile("out.png", qr, 0644) - if err != nil { - fmt.Println(err.Error()) - return - } - - fmt.Println(otp.OTP()) - for { - for { - t := time.Now() - if t.Second() == 0 { - break - } else if t.Second() == 30 { - break - } - <-time.After(1 * time.Second) - } - fmt.Println(otp.OTP()) - <-time.After(30 * time.Second) - } -}