chromium/third_party/pdfium/core/fdrm/fx_crypt_unittest.cpp

// Copyright 2016 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "core/fdrm/fx_crypt.h"

#include <algorithm>
#include <string>
#include <vector>

#include "core/fxcrt/bytestring.h"
#include "core/fxcrt/data_vector.h"
#include "core/fxcrt/fx_memcpy_wrappers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/utils/hash.h"

ElementsAre;
ElementsAreArray;

namespace {

std::string CRYPT_MD5String(const char* str) {}

void CheckArcFourContext(const CRYPT_rc4_context& context,
                         int32_t expected_x,
                         int32_t expected_y,
                         pdfium::span<const uint8_t> expected_permutation) {}

}  // namespace

// Originally from chromium's /src/base/md5_unittest.cc.
TEST(FXCRYPT, CryptToBase16) {}

TEST(FXCRYPT, MD5GenerateEmtpyData) {}

TEST(FXCRYPT, MD5GenerateOneByteData) {}

TEST(FXCRYPT, MD5GenerateLongData) {}

TEST(FXCRYPT, ContextWithEmptyData) {}

TEST(FXCRYPT, ContextWithLongData) {}

// Example data from http://www.ietf.org/rfc/rfc1321.txt A.5 Test Suite
TEST(FXCRYPT, MD5StringTestSuite1) {}

TEST(FXCRYPT, MD5StringTestSuite2) {}

TEST(FXCRYPT, MD5StringTestSuite3) {}

TEST(FXCRYPT, MD5StringTestSuite4) {}

TEST(FXCRYPT, MD5StringTestSuite5) {}

TEST(FXCRYPT, MD5StringTestSuite6) {}

TEST(FXCRYPT, MD5StringTestSuite7) {}

TEST(FXCRYPT, ContextWithStringData) {}

TEST(FXCRYPT, Sha1Empty) {}

// Originally from chromium's /src/base/sha1_unittest.cc
TEST(FXCRYPT, Sha1TestA1) {}

TEST(FXCRYPT, Sha1TestA2) {}

TEST(FXCRYPT, Sha256Empty) {}

TEST(FXCRYPT, Sha256TestB1) {}

TEST(FXCRYPT, Sha256TestB2) {}

TEST(FXCRYPT, CRYPT_ArcFourSetup) {}

TEST(FXCRYPT, CRYPT_ArcFourCrypt) {}

TEST(FXCRYPT, Sha384Empty) {}

// Verified against echo -n "..." | openssl sha384
TEST(FXCRYPT, Sha384Test) {}

// Verified against echo -n "..." | openssl sha384
TEST(FXCRYPT, Sha384Pad112) {}

TEST(FXCRYPT, Sha512Empty) {}

// Verified against echo -n "..." | openssl sha512
TEST(FXCRYPT, Sha512Test) {}

// Verified against echo -n "..." | openssl sha512
TEST(FXCRYPT, Sha512Pad112) {}