Skip to content

Commit a4a0152

Browse files
authored
Cleanup #39 (#42)
1 parent 1554831 commit a4a0152

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/nimble_totp.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ defmodule NimbleTOTP do
344344

345345
def valid?(_secret, _otp, _opts), do: false
346346

347-
@spec validate_digits(integer(), integer()) :: :error | integer()
347+
@spec validate_digits(integer(), integer()) :: integer()
348348
defp validate_digits(<<e, e_rest::binary>>, <<a, a_rest::binary>>) do
349349
bxor(e, a) ||| validate_digits(e_rest, a_rest)
350350
end

test/nimble_totp_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ defmodule NimbleTOTPTest do
187187
assert NimbleTOTP.valid?(secret, code, time: date_time)
188188
assert NimbleTOTP.valid?(secret, code, time: naive_date_time)
189189

190-
refute NimbleTOTP.valid?(secret, "abcdefgh", time: time)
191-
refute NimbleTOTP.valid?(secret, "abcdefgh", time: date_time)
192-
refute NimbleTOTP.valid?(secret, "abcdefgh", time: naive_date_time)
190+
refute NimbleTOTP.valid?(secret, "abcdef", time: time)
191+
refute NimbleTOTP.valid?(secret, "abcdef", time: date_time)
192+
refute NimbleTOTP.valid?(secret, "abcdef", time: naive_date_time)
193193
end
194194
end
195195

0 commit comments

Comments
 (0)