Debian Codegraph @

hotp_test.go

raw symbols SCIP
1 package gotp
2
3 import (
4 "testing"
5 )
6
7 var hotp = NewDefaultHOTP("4S62BZNFXXSZLCRO")
8
9 func TestHOTP_At(t *testing.T) {
10 otp := hotp.At(12345)
11 if "194001" != otp {
12 t.Error("HOTP generate otp error")
13 }
14 }
15
16 func TestHOTP_Verify(t *testing.T) {
17 if !hotp.Verify("194001", 12345) {
18 t.Error("verify faild")
19 }
20 }