Changeset View
Changeset View
Standalone View
Standalone View
src/script/sign.cpp
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | |||||
class DummySignatureCreator final : public BaseSignatureCreator { | class DummySignatureCreator final : public BaseSignatureCreator { | ||||
public: | public: | ||||
DummySignatureCreator() {} | DummySignatureCreator() {} | ||||
const BaseSignatureChecker &Checker() const override { | const BaseSignatureChecker &Checker() const override { | ||||
return DUMMY_CHECKER; | return DUMMY_CHECKER; | ||||
} | } | ||||
bool CreateSig(const SigningProvider &provider, | bool CreateSig(const SigningProvider &provider, | ||||
std::vector<uint8_t> &vchSig, const CKeyID &keyid, | std::vector<uint8_t> &vchSig, const CKeyID &keyid, | ||||
const CScript &scriptCode) const { | const CScript &scriptCode) const override { | ||||
// Create a dummy signature that is a valid DER-encoding | // Create a dummy signature that is a valid DER-encoding | ||||
vchSig.assign(72, '\000'); | vchSig.assign(72, '\000'); | ||||
vchSig[0] = 0x30; | vchSig[0] = 0x30; | ||||
vchSig[1] = 69; | vchSig[1] = 69; | ||||
vchSig[2] = 0x02; | vchSig[2] = 0x02; | ||||
vchSig[3] = 33; | vchSig[3] = 33; | ||||
vchSig[4] = 0x01; | vchSig[4] = 0x01; | ||||
vchSig[4 + 33] = 0x02; | vchSig[4 + 33] = 0x02; | ||||
Show All 9 Lines |