MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / IsDefinedHashtypeSignature

Function IsDefinedHashtypeSignature

src/script/interpreter.cpp:200–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool static IsDefinedHashtypeSignature(const valtype &vchSig) {
201 if (vchSig.size() == 0) {
202 return false;
203 }
204 unsigned char nHashType = vchSig[vchSig.size() - 1] & (~(SIGHASH_ANYONECANPAY));
205 if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
206 return false;
207
208 return true;
209}
210
211bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, script_verify_flags flags, ScriptError* serror) {
212 // Empty signature. Not strictly DER encoded, but allowed to provide a

Callers 1

CheckSignatureEncodingFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected