aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-04-28 03:09:13 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-06-21 19:47:39 +0200
commit1cc344ce42d8dddd6356c89ef3ceb58418676816 (patch)
tree36577c13adeaa82a546e3d9b5a6bb37c45c180f1 /src/script.cpp
parent85aab2a08824a83a535e6dfee4c150b25ebaf9de (diff)
Add built-in SHA-1 implementation.
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script.cpp b/src/script.cpp
index f20c0bcca3..facf3044d6 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -9,13 +9,12 @@
#include "hash.h"
#include "key.h"
#include "keystore.h"
+#include "sha1.h"
#include "sha2.h"
#include "sync.h"
#include "uint256.h"
#include "util.h"
-#include <openssl/sha.h>
-
#include <boost/foreach.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/tuple/tuple_comparison.hpp>
@@ -806,7 +805,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
if (opcode == OP_RIPEMD160)
RIPEMD160(&vch[0], vch.size(), &vchHash[0]);
else if (opcode == OP_SHA1)
- SHA1(&vch[0], vch.size(), &vchHash[0]);
+ CSHA1().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
else if (opcode == OP_SHA256)
CSHA256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
else if (opcode == OP_HASH160)