We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1b8965 commit bebee0cCopy full SHA for bebee0c
libdevcore/IpfsHash.cpp
@@ -78,6 +78,7 @@ bytes dev::ipfsHash(string _data)
78
79
cout << toHex(blockData) << endl;
80
cout << toHex(blockData.size()) << endl;
81
+ cout << "Hash: " << toHex(picosha2::hash256(std::move(blockData))) << endl;
82
// Multihash: sha2-256, 256 bits
83
bytes hash = bytes{0x12, 0x20} + picosha2::hash256(std::move(blockData));
84
return hash;
test/libdevcore/IpfsHash.cpp
@@ -45,7 +45,8 @@ BOOST_AUTO_TEST_CASE(test_small)
45
BOOST_AUTO_TEST_CASE(test_medium)
46
{
47
// 131000 works, 131071 does not.
48
- size_t length = 131000;//131071;
+ // TODO it seems to be an error in the sha2 library, though.
49
+ size_t length = 131071;//131071;
50
string data;
51
data.resize(length, 0);
52
BOOST_REQUIRE_EQUAL(data.size(), length);
0 commit comments