wallet::CCrypter::Encrypt

Encrypts plaintext key material with the configured key and IV.

Synopsis

Declared in <wallet/crypter.h>

[[nodiscard]]
bool
Encrypt(
    CKeyingMaterial const& vchPlaintext,
    std::vector<unsigned char>& vchCiphertext) const;

Return Value

true if encryption succeeded.

NOTE

The return value should not be discarded.

Parameters

NameDescription
vchPlaintextThe key material to encrypt.
vchCiphertextReceives the resulting ciphertext.