#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/gcm_driver/crypto/message_payload_parser.h"
#include "base/containers/span.h"
#include "base/numerics/byte_conversions.h"
#include "components/gcm_driver/crypto/gcm_decryption_result.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gcm {
namespace {
constexpr size_t kSaltSize = …;
constexpr size_t kPublicKeySize = …;
constexpr size_t kCiphertextSize = …;
const uint8_t kValidMessage[] = …;
static_assert …;
std::string CreateMessageString() { … }
TEST(MessagePayloadParserTest, ValidMessage) { … }
TEST(MessagePayloadParserTest, MinimumMessageSize) { … }
TEST(MessagePayloadParserTest, MinimumRecordSize) { … }
TEST(MessagePayloadParserTest, InvalidPublicKeyLength) { … }
TEST(MessagePayloadParserTest, InvalidPublicKeyFormat) { … }
}
}