MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / SetKey

Method SetKey

src/wallet/crypter.cpp:62–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 4

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

Calls 3

memcpyFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected