[#wallet-ScriptPubKeyMan-Encrypt]
= xref:wallet.adoc[wallet]::xref:wallet/ScriptPubKeyMan.adoc[ScriptPubKeyMan]::Encrypt
:relfileprefix: ../../
:mrdocs:

Encrypts this ScriptPubKeyMan&apos;s keys with the given master key, writing changes to the batch&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
Encrypt(
    xref:wallet/CKeyingMaterial.adoc[CKeyingMaterial] const& master&lowbar;key,
    xref:wallet/WalletBatch.adoc[WalletBatch]* batch);
----

== Return Value

true if the keys were encrypted&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *master&lowbar;key*
| The master key used to encrypt the keys&period;
| *batch*
| The database batch to write the encrypted keys through&period;
|===


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