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

Name

Description

hash

The 32‐byte message hash to sign.

vchSig

Output buffer receiving the DER‐serialized signature.

grind

Whether to grind the nonce for a small (low‐R) signature.

test_case

Tweaks the deterministic nonce (for testing).

Created with MrDocs