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

Encrypt an unencrypted wallet with the given passphrase&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
EncryptWallet(xref:SecureString.adoc[SecureString] const& strWalletPassphrase);
----

== Return Value

true if the wallet was encrypted&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *strWalletPassphrase*
| The passphrase to encrypt with&period;
|===


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