mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Add built-in SHA-1 implementation.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user