wallet::CCrypter::SetKey

Sets the encryption key and IV directly.

Synopsis

Declared in <wallet/crypter.h>

[[nodiscard]]
bool
SetKey(
    CKeyingMaterial const& new_key,
    std::span<unsigned char const> new_iv);

Return Value

true if the key and IV were the expected sizes and were set.

NOTE

The return value should not be discarded.

Parameters

NameDescription
new_keyThe key material to use.
new_ivThe initialization vector to use.