privacy_crypto_fuzzer: aes encrypt uses const iv

Bug: 323289757
Test: privacy_crypto_fuzzer
Change-Id: If3cde207fa726f6cbf8805cae0caa82a441c4173
This commit is contained in:
Robert Shih
2024-02-01 00:37:15 -08:00
parent f3e9794a00
commit a28f8bcf19

View File

@@ -120,9 +120,8 @@ void PrivacyCryptoFuzzer::Process() {
if (fdp_.ConsumeBool()) {
iv.resize(KEY_IV_SIZE, '0');
}
aes_cbc_key.Encrypt(fdp_.ConsumeRandomLengthString(kMaxByte),
fdp_.ConsumeBool() ? &enc_id : nullptr,
fdp_.ConsumeBool() ? &iv : nullptr);
aes_cbc_key.Encrypt(fdp_.ConsumeRandomLengthString(kMaxByte), iv,
fdp_.ConsumeBool() ? &enc_id : nullptr);
},
[&]() {
std::string data = fdp_.ConsumeRandomLengthString(kMaxByte);