19 const bool pad = fuzzed_data_provider.
ConsumeBool();
26 std::vector<uint8_t> ciphertext(plaintext.size() +
AES_BLOCKSIZE);
27 const int encrypt_ret = encrypt.
Encrypt(plaintext.data(), plaintext.size(), ciphertext.data());
28 ciphertext.resize(encrypt_ret);
29 std::vector<uint8_t> decrypted_plaintext(ciphertext.size());
30 const int decrypt_ret = decrypt.
Decrypt(ciphertext.data(), ciphertext.size(), decrypted_plaintext.data());
31 decrypted_plaintext.resize(decrypt_ret);
32 assert(decrypted_plaintext == plaintext || (!pad && plaintext.size() %
AES_BLOCKSIZE != 0 && encrypt_ret == 0 && decrypt_ret == 0));
std::vector< B > ConsumeFixedLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const size_t length) noexcept
Returns a byte vector of specified size regardless of the number of remaining bytes available from th...