Changeset View
Changeset View
Standalone View
Standalone View
src/script/sigencoding.h
Show All 22 Lines | inline SigHashType GetHashType(const valtype &vchSig) { | ||||
} | } | ||||
return SigHashType(vchSig[vchSig.size() - 1]); | return SigHashType(vchSig[vchSig.size() - 1]); | ||||
} | } | ||||
} // namespace | } // namespace | ||||
/** | /** | ||||
* Check that the signature provided on some data is properly encoded. | |||||
* Signatures passed to OP_CHECKDATASIG and its verify variant must be checked | |||||
* using this function. | |||||
*/ | |||||
bool CheckDataSignatureEncoding(const valtype &vchSig, uint32_t flags, | |||||
ScriptError *serror); | |||||
/** | |||||
* Check that the signature provided to authentify a transaction is properly | * Check that the signature provided to authentify a transaction is properly | ||||
* encoded. Signatures passed to OP_CHECKSIG, OP_CHECKMULTISIG and their verify | * encoded. Signatures passed to OP_CHECKSIG, OP_CHECKMULTISIG and their verify | ||||
* variants must be checked using this function. | * variants must be checked using this function. | ||||
*/ | */ | ||||
bool CheckTransactionSignatureEncoding(const valtype &vchSig, uint32_t flags, | bool CheckTransactionSignatureEncoding(const valtype &vchSig, uint32_t flags, | ||||
ScriptError *serror); | ScriptError *serror); | ||||
/** | /** | ||||
* Check that a public key is encoded properly. | * Check that a public key is encoded properly. | ||||
*/ | */ | ||||
bool CheckPubKeyEncoding(const valtype &vchPubKey, uint32_t flags, | bool CheckPubKeyEncoding(const valtype &vchPubKey, uint32_t flags, | ||||
ScriptError *serror); | ScriptError *serror); | ||||
#endif // BITCOIN_SCRIPT_SIGENCODING_H | #endif // BITCOIN_SCRIPT_SIGENCODING_H |