#include "components/enterprise/obfuscation/core/utils.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace enterprise_obfuscation {
namespace {
constexpr size_t kKeySize = …;
constexpr size_t kAuthTagSize = …;
constexpr size_t kMaxDataChunkSize = …;
constexpr size_t kNoncePrefixSize = …;
constexpr size_t kHeaderSize = …;
constexpr size_t kChunkSizePrefixSize = …;
void ObfuscateTestDataInChunks(const std::vector<uint8_t>& test_data,
std::vector<uint8_t>& obfuscated_content) { … }
}
class ObfuscationUtilsTest
: public ::testing::TestWithParam<std::tuple<bool, size_t>> { … };
TEST_P(ObfuscationUtilsTest, ObfuscateAndDeobfuscateSingleDataChunk) { … }
TEST_P(ObfuscationUtilsTest, DeobfuscateFileInPlace) { … }
TEST_P(ObfuscationUtilsTest, ObfuscateAndDeobfuscateVariableChunks) { … }
INSTANTIATE_TEST_SUITE_P(…);
}