[#wallet-WalletStorage-WithEncryptionKey]
= xref:wallet.adoc[wallet]::xref:wallet/WalletStorage.adoc[WalletStorage]::WithEncryptionKey
:relfileprefix: ../../
:mrdocs:

Pass the encryption key to cb()&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
WithEncryptionKey(std::function&lt;bool(xref:wallet/CKeyingMaterial.adoc[CKeyingMaterial] const&)&gt; cb) const = 0;
----

== Return Value

The value returned by cb, or false if the key is unavailable&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cb*
| Callback invoked with the wallet&apos;s master encryption key&period;
|===


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