[#wallet-LegacyDataSPKM-LoadCryptedKey]
= xref:wallet.adoc[wallet]::xref:wallet/LegacyDataSPKM.adoc[LegacyDataSPKM]::LoadCryptedKey
:relfileprefix: ../../
:mrdocs:

Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
LoadCryptedKey(
    xref:CPubKey.adoc[CPubKey] const& vchPubKey,
    std::vector&lt;unsigned char&gt; const& vchCryptedSecret,
    bool checksum&lowbar;valid);
----

== Return Value

true if the encrypted key was added&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *vchPubKey*
| The public key corresponding to the encrypted key&period;
| *vchCryptedSecret*
| The encrypted private key material&period;
| *checksum&lowbar;valid*
| Whether the stored checksum for the key is valid&period;
|===


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