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

Pad privkey bytes with 0s #8

Merged
merged 1 commit into from
Feb 13, 2015
Merged

Pad privkey bytes with 0s #8

merged 1 commit into from
Feb 13, 2015

Conversation

bip32JP
Copy link
Contributor

@bip32JP bip32JP commented Jan 1, 2015

I had a WIF privkey come up with a 5 instead of a L or K. The problem was the BigInteger created a 32 byte privkey with a "0x00" byte as msb. BigInteger's toByteArrayUnsigned() function does not account for that, so we must check the length and pad with 0 bytes to make 32 bytes.

I had a WIF privkey come up with a 5 instead of a L or K. The problem was the BigInteger created a 32 byte privkey with a "0x00" byte as msb. BigInteger's toByteArrayUnsigned() function does not account for that, so we must check the length and pad with 0 bytes to make 32 bytes.
@bip32JP
Copy link
Contributor Author

bip32JP commented Jan 1, 2015

Related to #4

bip32 added a commit that referenced this pull request Feb 13, 2015
Pad privkey bytes with 0s
@bip32 bip32 merged commit 49507d4 into bip32:master Feb 13, 2015
@bip32
Copy link
Owner

bip32 commented Feb 13, 2015

Thanks. My apologies on the delay.

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

Successfully merging this pull request may close these issues.

2 participants