CKey::SignCompact

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

Synopsis

Declared in <key.h>

bool
SignCompact(
    uint256 const& hash,
    std::vector<unsigned char>& vchSig) const;

Return Value

true if signing succeeded.

Parameters

NameDescription
hashThe 32-byte message hash to sign.
vchSigOutput buffer receiving the 65-byte compact signature.