CKey::Sign

Create a DER-serialized signature. The test_case parameter tweaks the deterministic nonce.

Synopsis

Declared in <key.h>

bool
Sign(
    uint256 const& hash,
    std::vector<unsigned char>& vchSig,
    bool grind = true,
    uint32_t test_case = 0) const;

Return Value

true if signing succeeded.

Parameters

NameDescription
hashThe 32-byte message hash to sign.
vchSigOutput buffer receiving the DER-serialized signature.
grindWhether to grind the nonce for a small (low-R) signature.
test_caseTweaks the deterministic nonce (for testing).