[#Descriptor-ToPrivateString]
= xref:Descriptor.adoc[Descriptor]::ToPrivateString
:relfileprefix: ../
:mrdocs:

Convert the descriptor to a private string&period; This uses public keys if the relevant private keys are not in the SigningProvider&period; If none of the relevant private keys are available, the output string in the &quot;out&quot; parameter will not contain any private key information, and this function will return &quot;false&quot;&period;

== Synopsis

Declared in `&lt;script&sol;descriptor&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
ToPrivateString(
    xref:SigningProvider.adoc[SigningProvider] const& provider,
    std::string& out) const = 0;
----

== Return Value

true if at least one private key available&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *provider* [in]
| The SigningProvider to query for private keys&period;
| *out* [out]
| The resulting descriptor string, containing private keys if available&period;
|===


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