A
Albretch Mueller
I justnoticed that Linux's sha256sum of a binary file
~
$ sha256sum -b *.bin
035dfc8af407ad305c9b6ad9c265efb57cc283684a37e7b94853c7aa76919ad0
*p69.bin
~
and java sha-256 signatures were not the same because (new BigInteger
(1, MD.digest())).toString(16) discards the leading 0's producing
~
35dfc8af407ad305c9b6ad9c265efb57cc283684a37e7b94853c7aa76919ad0
~
How do you deal with these subtle differences without a hack? Is
there a way to instruct BigInteger to keep leading 0's? Or anyother
way to do that?
~
$ sha256sum -b *.bin
035dfc8af407ad305c9b6ad9c265efb57cc283684a37e7b94853c7aa76919ad0
*p69.bin
~
and java sha-256 signatures were not the same because (new BigInteger
(1, MD.digest())).toString(16) discards the leading 0's producing
~
35dfc8af407ad305c9b6ad9c265efb57cc283684a37e7b94853c7aa76919ad0
~
How do you deal with these subtle differences without a hack? Is
there a way to instruct BigInteger to keep leading 0's? Or anyother
way to do that?