go-otp
go-otp copied to clipboard
Package go-otp implements one-time-password generators used in 2-factor authentication systems like RSA-tokens. Currently this supports both HOTP (RFC-4226), TOTP (RFC-6238) and Base32 encoding (RFC-3...
This should handle #7 by padding out the Base32 string to always be a multiple of 8 characters in length. That said, it feels like a dangerous spot to hide...
Given the value is in seconds, uint8 can't be used to have values like 5 minutes or more. The `Period` should be allowed to have higher values, even few days...
I added a unit test based on the example provided in the HOTP RFC.
Hello, I discovered that the code is not returning correct values for this seed: HG3ST7NLZJJRASIQSLQLZH2EDV Further testing has shown that all seeds in the same length produce an incorrect code....
Using a selector to choose between SHA1, SHA256 and SHA512. Hash algorithm is still default to SHA1.
Fixed #7