|
@ -31,12 +31,16 @@ |
|
|
#include <libdevcore/SHA3.h> |
|
|
#include <libdevcore/SHA3.h> |
|
|
#include <libdevcrypto/ECDHE.h> |
|
|
#include <libdevcrypto/ECDHE.h> |
|
|
#include <libdevcrypto/CryptoPP.h> |
|
|
#include <libdevcrypto/CryptoPP.h> |
|
|
|
|
|
#include <test/TestUtils.h> |
|
|
|
|
|
|
|
|
using namespace std; |
|
|
using namespace std; |
|
|
using namespace dev; |
|
|
using namespace dev; |
|
|
|
|
|
using namespace dev::test; |
|
|
using namespace dev::crypto; |
|
|
using namespace dev::crypto; |
|
|
using namespace CryptoPP; |
|
|
using namespace CryptoPP; |
|
|
|
|
|
|
|
|
|
|
|
BOOST_GLOBAL_FIXTURE( MoveNonceToTempDir ); |
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE(devcrypto) |
|
|
BOOST_AUTO_TEST_SUITE(devcrypto) |
|
|
|
|
|
|
|
|
static Secp256k1 s_secp256k1; |
|
|
static Secp256k1 s_secp256k1; |
|
@ -45,6 +49,7 @@ static CryptoPP::OID s_curveOID(CryptoPP::ASN1::secp256k1()); |
|
|
static CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> s_params(s_curveOID); |
|
|
static CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> s_params(s_curveOID); |
|
|
static CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP>::EllipticCurve s_curve(s_params.GetCurve()); |
|
|
static CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP>::EllipticCurve s_curve(s_params.GetCurve()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOST_AUTO_TEST_CASE(sha3general) |
|
|
BOOST_AUTO_TEST_CASE(sha3general) |
|
|
{ |
|
|
{ |
|
|
BOOST_REQUIRE_EQUAL(sha3(""), h256("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")); |
|
|
BOOST_REQUIRE_EQUAL(sha3(""), h256("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")); |
|
|