bip32 / bip32.github.io

BIP32 is a Brainwallet-based implementation for BIP0032 deterministic wallet generation
Other
111 stars 71 forks source link

Pad privkey bytes with 0s #8

Closed bip32JP closed 9 years ago

bip32JP commented 9 years ago

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 commented 9 years ago

Related to #4

bip32 commented 9 years ago

Thanks. My apologies on the delay.