#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/trusted_vault/securebox.h"
#include <cstdint>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace trusted_vault {
namespace {
Eq;
IsEmpty;
Ne;
NotNull;
SizeIs;
std::vector<uint8_t> StringToBytes(std::string_view str) { … }
class SecureBoxTest : public testing::Test { … };
TEST_F(SecureBoxTest, ShouldExportAndImportPublicKey) { … }
TEST_F(SecureBoxTest, ShouldExportAndImportPrivateKey) { … }
TEST_F(SecureBoxTest, ShouldExportPrivateKeyAndImportKeyPair) { … }
TEST_F(SecureBoxTest, ShouldGenerateDifferentKeys) { … }
TEST_F(SecureBoxTest, ShouldEncryptThenDecrypt) { … }
TEST_F(SecureBoxTest, ShouldEncryptThenDecryptWithEmptySharedSecret) { … }
TEST_F(SecureBoxTest, ShouldEncryptThenDecryptWithEmptyHeader) { … }
TEST_F(SecureBoxTest, ShouldEncryptThenDecryptWithEmptyPayload) { … }
TEST_F(SecureBoxTest, ShouldDecryptTestVectors) { … }
TEST_F(SecureBoxTest, ShouldEncryptThenDecryptInSymmetricMode) { … }
TEST_F(SecureBoxTest, ShouldDecryptTestVectorsInSymmetricMode) { … }
}
}