| 36 | } |
| 37 | |
| 38 | bool CCrypter::SetKey(const CKeyingMaterial& chNewKey, const std::vector<unsigned char>& chNewIV) |
| 39 | { |
| 40 | if (chNewKey.size() != WALLET_CRYPTO_KEY_SIZE || chNewIV.size() != WALLET_CRYPTO_KEY_SIZE) |
| 41 | return false; |
| 42 | |
| 43 | memcpy(&chKey[0], &chNewKey[0], sizeof chKey); |
| 44 | memcpy(&chIV[0], &chNewIV[0], sizeof chIV); |
| 45 | |
| 46 | fKeySet = true; |
| 47 | return true; |
| 48 | } |
| 49 | |
| 50 | bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char>& vchCiphertext) |
| 51 | { |
no test coverage detected