mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-01-19 19:20:02 +00:00
replace OP_SHA256 by OP_GOST3411
This commit is contained in:
parent
01256fe89d
commit
787ebbc8ad
@ -15,6 +15,7 @@ using namespace boost;
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "Gost.h"
|
||||||
|
|
||||||
bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);
|
bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);
|
||||||
|
|
||||||
@ -194,7 +195,7 @@ const char* GetOpName(opcodetype opcode)
|
|||||||
// crypto
|
// crypto
|
||||||
case OP_RIPEMD160 : return "OP_RIPEMD160";
|
case OP_RIPEMD160 : return "OP_RIPEMD160";
|
||||||
case OP_SHA1 : return "OP_SHA1";
|
case OP_SHA1 : return "OP_SHA1";
|
||||||
case OP_SHA256 : return "OP_SHA256";
|
case OP_GOST3411 : return "OP_GOST3411";
|
||||||
case OP_HASH160 : return "OP_HASH160";
|
case OP_HASH160 : return "OP_HASH160";
|
||||||
case OP_HASH256 : return "OP_HASH256";
|
case OP_HASH256 : return "OP_HASH256";
|
||||||
case OP_CODESEPARATOR : return "OP_CODESEPARATOR";
|
case OP_CODESEPARATOR : return "OP_CODESEPARATOR";
|
||||||
@ -784,7 +785,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
|
|||||||
//
|
//
|
||||||
case OP_RIPEMD160:
|
case OP_RIPEMD160:
|
||||||
case OP_SHA1:
|
case OP_SHA1:
|
||||||
case OP_SHA256:
|
case OP_GOST3411:
|
||||||
case OP_HASH160:
|
case OP_HASH160:
|
||||||
case OP_HASH256:
|
case OP_HASH256:
|
||||||
{
|
{
|
||||||
@ -797,8 +798,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
|
|||||||
RIPEMD160(&vch[0], vch.size(), &vchHash[0]);
|
RIPEMD160(&vch[0], vch.size(), &vchHash[0]);
|
||||||
else if (opcode == OP_SHA1)
|
else if (opcode == OP_SHA1)
|
||||||
SHA1(&vch[0], vch.size(), &vchHash[0]);
|
SHA1(&vch[0], vch.size(), &vchHash[0]);
|
||||||
else if (opcode == OP_SHA256)
|
else if (opcode == OP_GOST3411)
|
||||||
SHA256(&vch[0], vch.size(), &vchHash[0]);
|
i2p::crypto::GOSTR3411_2012_256 (&vch[0], vch.size(), &vchHash[0]);
|
||||||
else if (opcode == OP_HASH160)
|
else if (opcode == OP_HASH160)
|
||||||
{
|
{
|
||||||
uint160 hash160 = Hash160(vch);
|
uint160 hash160 = Hash160(vch);
|
||||||
|
@ -177,7 +177,7 @@ enum opcodetype
|
|||||||
// crypto
|
// crypto
|
||||||
OP_RIPEMD160 = 0xa6,
|
OP_RIPEMD160 = 0xa6,
|
||||||
OP_SHA1 = 0xa7,
|
OP_SHA1 = 0xa7,
|
||||||
OP_SHA256 = 0xa8,
|
OP_GOST3411 = 0xa8,
|
||||||
OP_HASH160 = 0xa9,
|
OP_HASH160 = 0xa9,
|
||||||
OP_HASH256 = 0xaa,
|
OP_HASH256 = 0xaa,
|
||||||
OP_CODESEPARATOR = 0xab,
|
OP_CODESEPARATOR = 0xab,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user