summaryrefslogtreecommitdiffstats
path: root/gac.go
diff options
context:
space:
mode:
Diffstat (limited to 'gac.go')
-rw-r--r--gac.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/gac.go b/gac.go
index 11d1910..4f83fa7 100644
--- a/gac.go
+++ b/gac.go
@@ -14,6 +14,7 @@ import (
const period = 30
+// Code returns the TOTP code and time remaining for the given secret and time.
func Code(secret string) (string, int) {
t := time.Now().Unix()
numIntervals := t / period