MCPcopy Create free account
hub / github.com/ElementsProject/elements / SetKey

Method SetKey

src/wallet/crypter.cpp:60–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigned char>& chNewIV)
61{
62 if (chNewKey.size() != WALLET_CRYPTO_KEY_SIZE || chNewIV.size() != WALLET_CRYPTO_IV_SIZE)
63 return false;
64
65 memcpy(vchKey.data(), chNewKey.data(), chNewKey.size());
66 memcpy(vchIV.data(), chNewIV.data(), chNewIV.size());
67
68 fKeySet = true;
69 return true;
70}
71
72bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char> &vchCiphertext) const
73{

Callers 6

RandomSeedMethod · 0.45
FastRandomContextMethod · 0.45
EncryptSecretFunction · 0.45
DecryptSecretFunction · 0.45
FUZZ_TARGETFunction · 0.45
FUZZ_TARGETFunction · 0.45

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by 2

FUZZ_TARGETFunction · 0.36
FUZZ_TARGETFunction · 0.36