[#wallet-CWallet-SignMessage]
= xref:wallet.adoc[wallet]::xref:wallet/CWallet.adoc[CWallet]::SignMessage
:relfileprefix: ../../
:mrdocs:

Sign an arbitrary message with the key for a public key hash&period;

== Synopsis

Declared in `&lt;wallet&sol;wallet&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:SigningResult.adoc[SigningResult]
SignMessage(
    std::string const& message,
    xref:PKHash.adoc[PKHash] const& pkhash,
    std::string& str&lowbar;sig) const;
----

== Return Value

The signing result status&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *message*
| The message to sign&period;
| *pkhash*
| The public key hash whose key signs the message&period;
| *str&lowbar;sig*
| Set to the resulting signature&period;
|===


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