Decrypts a secret with the master key using the given IV.

Synopsis

Declared in <wallet/crypter.h>

[[nodiscard]]
bool
DecryptSecret(
    CKeyingMaterial const& master_key,
    std::span<unsigned char const> ciphertext,
    uint256 const& iv,
    CKeyingMaterial& plaintext);

Return Value

true if decryption succeeded.

Note

The return value should not be discarded.

Parameters

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.

Created with MrDocs