Skip to content

Commit

Permalink
Merge pull request pquerna#22 from shawnps/master
Browse files Browse the repository at this point in the history
gofmt -s on test files
  • Loading branch information
pquerna authored Sep 13, 2017
2 parents 1baa031 + 9ffe5d0 commit dbd4707
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
20 changes: 10 additions & 10 deletions hotp/hotp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ var (
secSha1 = base32.StdEncoding.EncodeToString([]byte("12345678901234567890"))

rfcMatrixTCs = []tc{
tc{0, "755224", otp.AlgorithmSHA1, secSha1},
tc{1, "287082", otp.AlgorithmSHA1, secSha1},
tc{2, "359152", otp.AlgorithmSHA1, secSha1},
tc{3, "969429", otp.AlgorithmSHA1, secSha1},
tc{4, "338314", otp.AlgorithmSHA1, secSha1},
tc{5, "254676", otp.AlgorithmSHA1, secSha1},
tc{6, "287922", otp.AlgorithmSHA1, secSha1},
tc{7, "162583", otp.AlgorithmSHA1, secSha1},
tc{8, "399871", otp.AlgorithmSHA1, secSha1},
tc{9, "520489", otp.AlgorithmSHA1, secSha1},
{0, "755224", otp.AlgorithmSHA1, secSha1},
{1, "287082", otp.AlgorithmSHA1, secSha1},
{2, "359152", otp.AlgorithmSHA1, secSha1},
{3, "969429", otp.AlgorithmSHA1, secSha1},
{4, "338314", otp.AlgorithmSHA1, secSha1},
{5, "254676", otp.AlgorithmSHA1, secSha1},
{6, "287922", otp.AlgorithmSHA1, secSha1},
{7, "162583", otp.AlgorithmSHA1, secSha1},
{8, "399871", otp.AlgorithmSHA1, secSha1},
{9, "520489", otp.AlgorithmSHA1, secSha1},
}
)

Expand Down
42 changes: 21 additions & 21 deletions totp/totp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ var (
secSha512 = base32.StdEncoding.EncodeToString([]byte("1234567890123456789012345678901234567890123456789012345678901234"))

rfcMatrixTCs = []tc{
tc{59, "94287082", otp.AlgorithmSHA1, secSha1},
tc{59, "46119246", otp.AlgorithmSHA256, secSha256},
tc{59, "90693936", otp.AlgorithmSHA512, secSha512},
tc{1111111109, "07081804", otp.AlgorithmSHA1, secSha1},
tc{1111111109, "68084774", otp.AlgorithmSHA256, secSha256},
tc{1111111109, "25091201", otp.AlgorithmSHA512, secSha512},
tc{1111111111, "14050471", otp.AlgorithmSHA1, secSha1},
tc{1111111111, "67062674", otp.AlgorithmSHA256, secSha256},
tc{1111111111, "99943326", otp.AlgorithmSHA512, secSha512},
tc{1234567890, "89005924", otp.AlgorithmSHA1, secSha1},
tc{1234567890, "91819424", otp.AlgorithmSHA256, secSha256},
tc{1234567890, "93441116", otp.AlgorithmSHA512, secSha512},
tc{2000000000, "69279037", otp.AlgorithmSHA1, secSha1},
tc{2000000000, "90698825", otp.AlgorithmSHA256, secSha256},
tc{2000000000, "38618901", otp.AlgorithmSHA512, secSha512},
tc{20000000000, "65353130", otp.AlgorithmSHA1, secSha1},
tc{20000000000, "77737706", otp.AlgorithmSHA256, secSha256},
tc{20000000000, "47863826", otp.AlgorithmSHA512, secSha512},
{59, "94287082", otp.AlgorithmSHA1, secSha1},
{59, "46119246", otp.AlgorithmSHA256, secSha256},
{59, "90693936", otp.AlgorithmSHA512, secSha512},
{1111111109, "07081804", otp.AlgorithmSHA1, secSha1},
{1111111109, "68084774", otp.AlgorithmSHA256, secSha256},
{1111111109, "25091201", otp.AlgorithmSHA512, secSha512},
{1111111111, "14050471", otp.AlgorithmSHA1, secSha1},
{1111111111, "67062674", otp.AlgorithmSHA256, secSha256},
{1111111111, "99943326", otp.AlgorithmSHA512, secSha512},
{1234567890, "89005924", otp.AlgorithmSHA1, secSha1},
{1234567890, "91819424", otp.AlgorithmSHA256, secSha256},
{1234567890, "93441116", otp.AlgorithmSHA512, secSha512},
{2000000000, "69279037", otp.AlgorithmSHA1, secSha1},
{2000000000, "90698825", otp.AlgorithmSHA256, secSha256},
{2000000000, "38618901", otp.AlgorithmSHA512, secSha512},
{20000000000, "65353130", otp.AlgorithmSHA1, secSha1},
{20000000000, "77737706", otp.AlgorithmSHA256, secSha256},
{20000000000, "47863826", otp.AlgorithmSHA512, secSha512},
}
)

Expand Down Expand Up @@ -99,9 +99,9 @@ func TestValidateSkew(t *testing.T) {
secSha1 := base32.StdEncoding.EncodeToString([]byte("12345678901234567890"))

tests := []tc{
tc{29, "94287082", otp.AlgorithmSHA1, secSha1},
tc{59, "94287082", otp.AlgorithmSHA1, secSha1},
tc{61, "94287082", otp.AlgorithmSHA1, secSha1},
{29, "94287082", otp.AlgorithmSHA1, secSha1},
{59, "94287082", otp.AlgorithmSHA1, secSha1},
{61, "94287082", otp.AlgorithmSHA1, secSha1},
}

for _, tx := range tests {
Expand Down

0 comments on commit dbd4707

Please sign in to comment.