[#wallet-WalletBatch-WriteCryptedKey] = xref:wallet.adoc[wallet]::xref:wallet/WalletBatch.adoc[WalletBatch]::WriteCryptedKey :relfileprefix: ../../ :mrdocs: Writes an encrypted private key and its metadata. == Synopsis Declared in `<wallet/walletdb.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool WriteCryptedKey( xref:CPubKey.adoc[CPubKey] const& vchPubKey, std::vector<unsigned char> const& vchCryptedSecret, xref:wallet/CKeyMetadata.adoc[CKeyMetadata] const& keyMeta); ---- == Return Value true if the record was written. == Parameters [cols="1,4"] |=== | Name| Description | *vchPubKey* | The public key. | *vchCryptedSecret* | The encrypted private key material. | *keyMeta* | The key metadata to store. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#