libbitcoin / libbitcoin-explorer

Bitcoin Command Line Tool
Other
601 stars 177 forks source link

Can't reproduce a hash example in the wiki #693

Closed grondilu closed 3 years ago

grondilu commented 3 years ago

Exemple 2 in the ripemd160 section :

$ bx base16-encode "L'homme est libre au moment qu'il veut l'être."
4c27686f6d6d6520657374206c69627265206175206d6f6d656e7420717527696c2076657574206c27c3aa7472652e
$ !! | xxd -p -r | openssl dgst -ripemd160 -hex
(stdin)= 66158c985cff84541e10a278c7cdefb8bacea332

In the wiki the result is supposed to be 96112e7f21c344091f6a413267e3cbcf0d79f6f8, not 66158c985cff84541e10a278c7cdefb8bacea332

The hex encoding of the sentence is the same though, so this is not the issue.

grondilu commented 3 years ago

My bad, the hex is different. The character 'ê' was encoded differently (latin1 vs utf-8 or something I suppose).

Closing.