diff options
author | Gav Wood <i@gavwood.com> | 2015-05-20 01:38:17 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-05-20 01:38:17 +0800 |
commit | bae5779ab27a5d9d0eca7f567453116c16ae0d80 (patch) | |
tree | 5d5f46dfd7f2fafa50864f4f436e6b5583c2ab78 | |
parent | 8512e30f0ac9193c21d1ce70409426a469ff395a (diff) | |
download | dexon-solidity-bae5779ab27a5d9d0eca7f567453116c16ae0d80.tar.gz dexon-solidity-bae5779ab27a5d9d0eca7f567453116c16ae0d80.tar.zst dexon-solidity-bae5779ab27a5d9d0eca7f567453116c16ae0d80.zip |
SHA3, RIPEMD160 and SHA256 are now not cryptopp impls.
-rw-r--r-- | libsolidity/SolidityEndToEndTest.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libsolidity/SolidityEndToEndTest.cpp b/libsolidity/SolidityEndToEndTest.cpp index 6713382f..aa51a674 100644 --- a/libsolidity/SolidityEndToEndTest.cpp +++ b/libsolidity/SolidityEndToEndTest.cpp @@ -24,7 +24,7 @@ #include <string> #include <tuple> #include <boost/test/unit_test.hpp> -#include <libdevcrypto/SHA3.h> +#include <libdevcrypto/Hash.h> #include <test/libsolidity/solidityExecutionFramework.h> using namespace std; @@ -1501,9 +1501,7 @@ BOOST_AUTO_TEST_CASE(sha256) compileAndRun(sourceCode); auto f = [&](u256 const& _input) -> u256 { - h256 ret; - dev::sha256(dev::ref(toBigEndian(_input)), bytesRef(&ret[0], 32)); - return ret; + return dev::sha256(dev::ref(toBigEndian(_input))); }; testSolidityAgainstCpp("a(bytes32)", f, u256(4)); testSolidityAgainstCpp("a(bytes32)", f, u256(5)); @@ -1520,9 +1518,7 @@ BOOST_AUTO_TEST_CASE(ripemd) compileAndRun(sourceCode); auto f = [&](u256 const& _input) -> u256 { - h256 ret; - dev::ripemd160(dev::ref(toBigEndian(_input)), bytesRef(&ret[0], 32)); - return u256(ret); + return h256(dev::ripemd160(h256(_input).ref()), h256::AlignLeft); // This should be aligned right. i guess it's fixed elsewhere? }; testSolidityAgainstCpp("a(bytes32)", f, u256(4)); testSolidityAgainstCpp("a(bytes32)", f, u256(5)); |