[#wallet-DecryptSecret] = xref:wallet.adoc[wallet]::DecryptSecret :relfileprefix: ../ :mrdocs: Decrypts a secret with the master key using the given IV. == Synopsis Declared in `<wallet/crypter.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] bool DecryptSecret( xref:wallet/CKeyingMaterial.adoc[CKeyingMaterial] const& master_key, std::span<unsigned char const> ciphertext, xref:uint256.adoc[uint256] const& iv, xref:wallet/CKeyingMaterial.adoc[CKeyingMaterial]& plaintext); ---- == Return Value true if decryption succeeded. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *master_key* | The master key used as the decryption key. | *ciphertext* | The ciphertext to decrypt. | *iv* | Source of the initialization vector. | *plaintext* | Receives the recovered secret. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#