Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOT CROCKFORD COMPATIBLE #23

Open
bbourdel opened this issue Mar 26, 2019 · 3 comments
Open

NOT CROCKFORD COMPATIBLE #23

bbourdel opened this issue Mar 26, 2019 · 3 comments

Comments

@bbourdel
Copy link

Please : why did you use the U instead of S ?

The crockford alpahbeth is : 0123456789abcdefghjkmnpqrstvwxyz
The one you use is : 0123456789abcdefghjkmnpqrtuvwxyz
Not the S is not present in your alphabet and the U is present.

This is not the Crockford Base32 correct implementation :
source : https://en.wikipedia.org/wiki/Base32 and https://www.crockford.com/base32.html and all other package in all other language (ie Python for my backend....)
I've lost 4 hours to figure out what's happened ....

@mnp
Copy link

mnp commented Jun 30, 2019

It's also emitting ones "1" and zeros "0".

@bbourdel
Copy link
Author

bbourdel commented Jul 1, 2019 via email

@alexp1917
Copy link

I dont know if this is the same issue, but in case it is, here's another example where this library disagrees with linux tools and the competing top result (hi-base32?)

echo '6cf477f57dcfbaa61275d336c3ba2fc7dd28ecee18a4f20c004732878d7d' | xxd -r -p | base32
# prints NT2HP5L5Z65KMETV2M3MHORPY7OSR3HODCSPEDAAI4ZIPDL5

and then this unexpected result:

#!/usr/bin/env node
var base32 = require('base32');

var echo = '6cf477f57dcfbaa61275d336c3ba2fc7dd28ecee18a4f20c004732878d7d'
var xxdStep = Buffer.from(echo, 'hex');
//xxdStep = xxdStep.toString();
var b32 = base32.encode(xxdStep);

console.log(b32);
// prints dku7fxbxtyxac4knucvc7ehfrzejhv7e32jf43008wt8f3bx

I mean granted this library has a disclaimer on it, and im grateful for that or else i would have spent even more time figuring this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants