Initial import.
Basic HOTP functionality.
This commit is contained in:
13
otp_test.go
Normal file
13
otp_test.go
Normal 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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user