Initial import.

Basic HOTP functionality.
This commit is contained in:
Kyle Isom
2013-12-18 21:48:14 -07:00
commit dbbd5116b5
5 changed files with 340 additions and 0 deletions

13
otp_test.go Normal file
View File

@@ -0,0 +1,13 @@
package twofactor
import "fmt"
import "testing"
func TestHOTPString(t *testing.T) {
hotp := NewHOTP(nil, 0, 6)
hotpString := OTPString(hotp)
if hotpString != "OATH-HOTP, 6" {
fmt.Println("twofactor: invalid OTP string")
t.FailNow()
}
}