go-otp icon indicating copy to clipboard operation
go-otp copied to clipboard

Handle padding on base32 secrets

Open akerl opened this issue 7 years ago • 0 comments

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 the errors from base32 decoding the secret. Fixing that would require changing the API such that Get() (and thus the TOTP validate calls as well) would return an error in addition to their existing result.

akerl avatar Oct 03 '18 03:10 akerl