-
Notifications
You must be signed in to change notification settings - Fork 61
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
Comments
It's also emitting ones "1" and zeros "0". |
This is normal.
Here the Crockford32 official specification : https://www.crockford.com/base32.html
0, O, o can be decoded as the same value 0x00, but the value 0x00 is alwais encoded as 0 (zero)
…________________________________
De : Mitchell Perilstein <[email protected]>
Envoyé : lundi 1 juillet 2019 00:04
À : agnoster/base32-js
Cc : bbourdel; Author
Objet : Re: [agnoster/base32-js] NOT CROCKFORD COMPATIBLE (#23)
It's also emitting ones "1" and zeros "0".
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#23?email_source=notifications&email_token=ACKWBYVDUIYCTNU3KFJHVIDP5EUYPA5CNFSM4HBQAY32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY4UWHY#issuecomment-507071263>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACKWBYTZFDMBNSMN7U2E6XTP5EUYPANCNFSM4HBQAY3Q>.
|
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 |
lemon-gith
added a commit
to lemon-gith/base32-js
that referenced
this issue
May 11, 2024
agnoster
pushed a commit
that referenced
this issue
Sep 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 ....
The text was updated successfully, but these errors were encountered: