[#CKey-SignCompact]
= xref:CKey.adoc[CKey]::SignCompact
:relfileprefix: ../
:mrdocs:

Create a compact signature (65 bytes), which allows reconstructing the used public key&period; The format is one header byte, followed by two times 32 bytes for the serialized r and s values&period; The header byte&colon; 0x1B &equals; first key with even y, 0x1C &equals; first key with odd y, 0x1D &equals; second key with even y, 0x1E &equals; second key with odd y, add 0x04 for compressed keys&period;

== Synopsis

Declared in `&lt;key&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
SignCompact(
    xref:uint256.adoc[uint256] const& hash,
    std::vector&lt;unsigned char&gt;& vchSig) const;
----

== Return Value

true if signing succeeded&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *hash*
| The 32&hyphen;byte message hash to sign&period;
| *vchSig*
| Output buffer receiving the 65&hyphen;byte compact signature&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
