:: Re: [Libbitcoin] new ripemd generat…
Página Principal
Delete this message
Reply to this message
Autor: Amir Taaki
Data:  
Para: Libbitcoin
Assunto: Re: [Libbitcoin] new ripemd generates different hashes
$ cd libbitcoin/test/
$ ./make.sh
Linking...
Running 8 test cases...
hash.cpp(32): fatal error in "sha256_hash": critical check
encode_hex(ripemd_hash) == "17d040b739d639c729daaf627eaff88cfe4207f4"
failed

*** 1 failure detected in test suite "libbitcoin tests"


> between computer 1 (working) and computer 2 (newest). I've added a unit
> test for ripemd in test/ which should pass.
>
> genjix@astra1609:~$ cat test.cpp
> #include <bitcoin/bitcoin.hpp>
> using namespace bc;
>
> int main()
> {
>     std::cout << generate_ripemd_hash(data_chunk{{110}}) << std::endl;
>     return 0;
> }

>
> genjix@astra1609:~$ ./a.out
> 17d040b739d639c729daaf627eaff88cfe4207f4
>
> --------------------------------------------
>
> /tmp> cat rh.cpp
> #include <bitcoin/bitcoin.hpp>
> using namespace bc;
>
> int main()
> {
>         std::cout << generate_short_hash(data_chunk{{110}}) << std::endl;
>             return 0;
> }

>
> /tmp> ./a.out
> 2a392d9c021a12ab0b51d90e438a54b11bf27497
>
> --------------------
>
> and when I add output to the libbitcoin ripemd hash function in the
> source:
>
> sha hash: 1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9
> ripemd hash: 17d040b739d639c729daaf627eaff88cfe4207f4
> 17d040b739d639c729daaf627eaff88cfe4207f4
>
> ---------------
> (newest)
>
> sha256: 1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9
> ripemd: 2a392d9c021a12ab0b51d90e438a54b11bf27497
> 2a392d9c021a12ab0b51d90e438a54b11bf27497
>
>
>