[#CKey-Sign] = xref:CKey.adoc[CKey]::Sign :relfileprefix: ../ :mrdocs: Create a DER‐serialized signature. The test_case parameter tweaks the deterministic nonce. == Synopsis Declared in `<key.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool Sign( xref:uint256.adoc[uint256] const& hash, std::vector<unsigned char>& vchSig, bool grind = true, uint32_t test_case = 0) const; ---- == Return Value true if signing succeeded. == Parameters [cols="1,4"] |=== | 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). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#