brainwallet / brainwallet.github.io

Brainwallet site
https://brainwallet.org
291 stars 409 forks source link

Converter tab has major bug #44

Closed ianthius closed 10 years ago

ianthius commented 10 years ago

Repro: [1] Start up the converter tab [2] Enter hex for input and hex for output [3] enter the hex number "3676456D5D4F44A" as input [4] see the actual output is "3676456D5D4F440A"

I found this as I was implementing decimal as an input. I have the code for that but it is dependent on a fix for this issue as I believe this issue is based on the Crypto.util.hexToBytes() you are using. It is outputing inccorrect bytes. Adding leading zeros to the first byte. I will try and find time to upload my changes for adding decimal later today. I have implemented a new big number division algorithm that you could just use for all the conversions if i were to add changeable radix support.

Note: binary to binary conversion is also messed up try selecting binary -> binary and entering binary number "1000011010010010010100010010110110101100101000111000101000110"

Best not to trust the converter for mission critical conversions ATM.

brainwallet commented 10 years ago

Thank you, fixed in 8e8a623e8d6698284d1a1b7efd14134e17403d93 and f1e931a60d46e7125ffc8addf8036e421046c9d7 respectively.