From 13b5dfef64bbb77d583b2acc59e2b33f89645308 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 28 Apr 2014 12:20:15 +0200 Subject: [PATCH] Move crypto implementations to src/crypto/ --- src/Makefile.am | 8 ++++---- src/{ => crypto}/sha1.cpp | 2 +- src/{ => crypto}/sha1.h | 0 src/{ => crypto}/sha2.cpp | 2 +- src/{ => crypto}/sha2.h | 0 src/hash.h | 2 +- src/key.cpp | 2 +- src/script.cpp | 4 ++-- src/test/sha1_tests.cpp | 2 +- src/test/sha2_tests.cpp | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) rename src/{ => crypto}/sha1.cpp (99%) rename src/{ => crypto}/sha1.h (100%) rename src/{ => crypto}/sha2.cpp (99%) rename src/{ => crypto}/sha2.h (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 67b069bde..bc65119a9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -75,8 +75,8 @@ BITCOIN_CORE_H = \ rpcserver.h \ script.h \ serialize.h \ - sha2.h \ - sha1.h \ + crypto/sha2.h \ + crypto/sha1.h \ sync.h \ threadsafety.h \ tinyformat.h \ @@ -154,8 +154,8 @@ libbitcoin_common_a_SOURCES = \ protocol.cpp \ rpcprotocol.cpp \ script.cpp \ - sha1.cpp \ - sha2.cpp \ + crypto/sha1.cpp \ + crypto/sha2.cpp \ sync.cpp \ util.cpp \ version.cpp \ diff --git a/src/sha1.cpp b/src/crypto/sha1.cpp similarity index 99% rename from src/sha1.cpp rename to src/crypto/sha1.cpp index 0a7007754..4b2e3e19d 100644 --- a/src/sha1.cpp +++ b/src/crypto/sha1.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "sha1.h" +#include "crypto/sha1.h" #include diff --git a/src/sha1.h b/src/crypto/sha1.h similarity index 100% rename from src/sha1.h rename to src/crypto/sha1.h diff --git a/src/sha2.cpp b/src/crypto/sha2.cpp similarity index 99% rename from src/sha2.cpp rename to src/crypto/sha2.cpp index c9beaf220..0d0c32883 100644 --- a/src/sha2.cpp +++ b/src/crypto/sha2.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "sha2.h" +#include "crypto/sha2.h" #include diff --git a/src/sha2.h b/src/crypto/sha2.h similarity index 100% rename from src/sha2.h rename to src/crypto/sha2.h diff --git a/src/hash.h b/src/hash.h index 9e7a67550..318399c33 100644 --- a/src/hash.h +++ b/src/hash.h @@ -6,7 +6,7 @@ #ifndef BITCOIN_HASH_H #define BITCOIN_HASH_H -#include "sha2.h" +#include "crypto/sha2.h" #include "serialize.h" #include "uint256.h" #include "version.h" diff --git a/src/key.cpp b/src/key.cpp index 068594892..96b1ac439 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -4,7 +4,7 @@ #include "key.h" -#include "sha2.h" +#include "crypto/sha2.h" #include #include diff --git a/src/script.cpp b/src/script.cpp index facf3044d..c6574a6ee 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -9,8 +9,8 @@ #include "hash.h" #include "key.h" #include "keystore.h" -#include "sha1.h" -#include "sha2.h" +#include "crypto/sha1.h" +#include "crypto/sha2.h" #include "sync.h" #include "uint256.h" #include "util.h" diff --git a/src/test/sha1_tests.cpp b/src/test/sha1_tests.cpp index bae17c5d4..88f2da0bb 100644 --- a/src/test/sha1_tests.cpp +++ b/src/test/sha1_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "sha1.h" +#include "crypto/sha1.h" #include "util.h" #include diff --git a/src/test/sha2_tests.cpp b/src/test/sha2_tests.cpp index 516b942ad..1e48c973c 100644 --- a/src/test/sha2_tests.cpp +++ b/src/test/sha2_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "sha2.h" +#include "crypto/sha2.h" #include "util.h" #include