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

Issue where BigInt.toByteArrayUnsigned returns 31 bytes #4

Open
Ninkip2p opened this issue Apr 21, 2014 · 2 comments
Open

Issue where BigInt.toByteArrayUnsigned returns 31 bytes #4

Ninkip2p opened this issue Apr 21, 2014 · 2 comments

Comments

@Ninkip2p
Copy link

Here is an example root key:
tprv8ZgxMBicQKsPetSeaqxJJLxz6rRvxz2fuTBKt4ntiqRjTAdmqkqdFKDCX9X9dgPLcEXELNSADqXkDzHs77WJcP6wDvQ5XcX7k5UxBiAZTzH

For some reason BigInt.toByteArrayUnsigned returns byte array without the leading 0 byte, inserting this into the byte array in the case of the length being 31 seems to fix this

@anaoum
Copy link
Contributor

anaoum commented Oct 24, 2014

I just submitted a pull request #5 for this bug. Hopefully it gets merged soon as this can go dangerously unnoticed by the end user.

@bip32JP
Copy link
Contributor

bip32JP commented Jan 1, 2015

Found another place where toByteArrayUnsigned() did some funky stuff...

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