Browse Source

cleanup headers

cl-refactor
subtly 10 years ago
parent
commit
f9876b5c6e
  1. 48
      libdevcrypto/CryptoHeaders.h
  2. 4
      libdevcrypto/CryptoPP.cpp
  3. 30
      libdevcrypto/CryptoPP.h
  4. 2
      libdevcrypto/SHA3.cpp
  5. 2
      libethcore/ProofOfWork.cpp

48
libdevcrypto/CryptoHeaders.h

@ -1,48 +0,0 @@
/*
This file is part of cpp-ethereum.
cpp-ethereum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
cpp-ethereum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file CryptoHeaders.h
* @author Tim Hughes <tim@twistedfury.com>
* @date 2014
*/
#pragma once
// need to leave this one disabled
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma warning(push)
#pragma warning(disable:4100 4244)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
#pragma GCC diagnostic ignored "-Wextra"
#include <sha.h>
#include <sha3.h>
#include <ripemd.h>
#include <aes.h>
#include <pwdbased.h>
#include <modes.h>
#include <filters.h>
#include <eccrypto.h>
#include <ecp.h>
#include <files.h>
#include <osrng.h>
#include <oids.h>
#include <secp256k1/secp256k1.h>
#pragma warning(pop)
#pragma GCC diagnostic pop

4
libdevcrypto/CryptoPP.cpp

@ -14,11 +14,9 @@
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file CryptoPP.h
/** @file CryptoPP.cpp
* @author Alex Leverington <nessence@gmail.com>
* @date 2014
*
* CryptoPP wrappers
*/
#include "CryptoPP.h"

30
libdevcrypto/CryptoPP.h

@ -18,13 +18,38 @@
* @author Alex Leverington <nessence@gmail.com>
* @date 2014
*
* CryptoPP wrappers
* CryptoPP headers and helper methods
*/
#pragma once
// need to leave this one disabled
//#pragma GCC diagnostic ignored "-Wunused-function"
#pragma warning(push)
#pragma warning(disable:4100 4244)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
#pragma GCC diagnostic ignored "-Wextra"
#include <sha.h>
#include <sha3.h>
#include <ripemd.h>
#include <aes.h>
#include <pwdbased.h>
#include <modes.h>
#include <filters.h>
#include <eccrypto.h>
#include <ecp.h>
#include <files.h>
#include <osrng.h>
#include <oids.h>
#include <secp256k1/secp256k1.h>
#pragma warning(pop)
#pragma GCC diagnostic pop
#include "Common.h"
#include "CryptoHeaders.h"
namespace dev
{
@ -32,7 +57,6 @@ namespace crypto
{
namespace pp
// cryptopp wrappers
{
/// RNG used by CryptoPP
inline CryptoPP::AutoSeededRandomPool& PRNG() { static CryptoPP::AutoSeededRandomPool prng; return prng; }

2
libdevcrypto/SHA3.cpp

@ -20,7 +20,7 @@
*/
#include "SHA3.h"
#include "CryptoHeaders.h"
#include "CryptoPP.h"
using namespace std;
using namespace dev;

2
libethcore/ProofOfWork.cpp

@ -26,7 +26,7 @@
#include <array>
#include <random>
#include <thread>
#include <libethcore/CryptoHeaders.h>
#include <libdevcrypto/CryptoPP.h>
#include <libdevcore/Common.h>
#include "ProofOfWork.h"
using namespace std;

Loading…
Cancel
Save