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

Fails to decode checked variant #29

Open
Talkless opened this issue Oct 24, 2023 · 2 comments
Open

Fails to decode checked variant #29

Talkless opened this issue Oct 24, 2023 · 2 comments

Comments

@Talkless
Copy link

Non-checked version works:

$ ./base58 "hello world" 
StV1DL6CwTryKyV
$ ./base58 -d 11 StV1DL6CwTryKyV
hello world

Check fails:

$ ./base58 -c "hello world"
3vQB7B6MrGQZaxCuFg4oh
$ ./base58 -d 11 -c 3vQB7B6MrGQZaxCuFg4oh
<nothing>
$ echo $?
2

Or am I using CLI incorreclty? Though originally detected issue with library to - was unable to decode there too.

@Talkless
Copy link
Author

Talkless commented Oct 24, 2023

Wait, I was using luke-jr/libbase58...

EDIT: same with bitcoin/libbase58

@Talkless
Copy link
Author

Talkless commented Oct 24, 2023

OK it seems I have to specify lenght + checkum_length, and I get whole decoded string including checksum:

$ ./base58 -d 15 -c 3vQB7B6MrGQZaxCuFg4oh
hello world�bԸ

Maybe this specific could be documented? I see there's word "cannonical base58 length" mentioned, but not sure how to interpret it.

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

1 participant