aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-05-01 00:43:31 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2014-06-21 19:47:42 +0200
commita5bc9c09177420bd1c6a1f9ece9ecfbe80c453fe (patch)
tree80897d1583c290f1ec077e405cca070f41034eef /src/script.cpp
parent13b5dfef64bbb77d583b2acc59e2b33f89645308 (diff)
downloadbitcoin-a5bc9c09177420bd1c6a1f9ece9ecfbe80c453fe.tar.xz
Add built-in RIPEMD-160 implementation
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script.cpp b/src/script.cpp
index c6574a6ee8..b383a00a6e 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -11,6 +11,7 @@
#include "keystore.h"
#include "crypto/sha1.h"
#include "crypto/sha2.h"
+#include "crypto/ripemd160.h"
#include "sync.h"
#include "uint256.h"
#include "util.h"
@@ -803,7 +804,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
valtype& vch = stacktop(-1);
valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
if (opcode == OP_RIPEMD160)
- RIPEMD160(&vch[0], vch.size(), &vchHash[0]);
+ CRIPEMD160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
else if (opcode == OP_SHA1)
CSHA1().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
else if (opcode == OP_SHA256)