marcelocquadros / androidtoken

Automatically exported from code.google.com/p/androidtoken
0 stars 0 forks source link

Long base32 keys are not correctly parsed #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am using the f-droid build. I was migrating my setup from Google 
Authenticator's database file.

When manually importing seeds in base32, I have encountered that 
16-character-long seeds work correctly, but 26-character-long ones (e.g., 
mt.gox) do not. The tokens displayed are different to those of Google 
Authenticator (those expected by the website).

Workaround: I converted the code to hex using the base32tohex function from
http://gauth.apps.gbraad.nl/ in a JS console. When importing the hex seed to 
androidtoken, the right codes get displayed.

Simplified example: Test the base32 seeds:
ABABABABABABABAB
vs
ABABABABABABABABAB
The first one (16 bytes) works, while the second one does not.

Original issue reported on code.google.com by oriolp...@gmail.com on 20 Aug 2014 at 6:00