summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-12 18:54:31 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-12 18:54:31 +0000
commitd145e4b923ae99f67b734924885738437248aa85 (patch)
tree523c8bd30a4385c7f13fcf6ddffcb25ab5057255
parent76833a60164e77bd54c6f4d1cc62a79ded8edb90 (diff)
downloadpdfium-d145e4b923ae99f67b734924885738437248aa85.tar.xz
Move core/fdrm/crypto/* to core/fdrm/.
core/fdrm/ currently only contains the crypto directory. Change-Id: I68f4a38e7098f8a3bdc19764bc1ec78c28a386c9 Reviewed-on: https://pdfium-review.googlesource.com/c/43945 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
-rw-r--r--BUILD.gn10
-rw-r--r--core/fdrm/fx_crypt.cpp (renamed from core/fdrm/crypto/fx_crypt.cpp)2
-rw-r--r--core/fdrm/fx_crypt.h (renamed from core/fdrm/crypto/fx_crypt.h)6
-rw-r--r--core/fdrm/fx_crypt_aes.cpp (renamed from core/fdrm/crypto/fx_crypt_aes.cpp)6
-rw-r--r--core/fdrm/fx_crypt_sha.cpp (renamed from core/fdrm/crypto/fx_crypt_sha.cpp)2
-rw-r--r--core/fdrm/fx_crypt_unittest.cpp (renamed from core/fdrm/crypto/fx_crypt_unittest.cpp)2
-rw-r--r--core/fpdfapi/page/cpdf_docpagedata.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_crypto_handler.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_crypto_handler.h2
-rw-r--r--core/fpdfapi/parser/cpdf_security_handler.cpp2
-rw-r--r--fpdfsdk/fpdf_attachment.cpp2
-rw-r--r--fxjs/cjs_globaldata.cpp2
-rw-r--r--testing/embedder_test.cpp2
-rw-r--r--testing/test_support.cpp2
14 files changed, 21 insertions, 23 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 068d41249c..87c384900d 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -192,10 +192,10 @@ visibility = [
jumbo_source_set("fdrm") {
sources = [
- "core/fdrm/crypto/fx_crypt.cpp",
- "core/fdrm/crypto/fx_crypt.h",
- "core/fdrm/crypto/fx_crypt_aes.cpp",
- "core/fdrm/crypto/fx_crypt_sha.cpp",
+ "core/fdrm/fx_crypt.cpp",
+ "core/fdrm/fx_crypt.h",
+ "core/fdrm/fx_crypt_aes.cpp",
+ "core/fdrm/fx_crypt_sha.cpp",
]
configs += [ ":pdfium_core_config" ]
deps = [
@@ -1057,7 +1057,7 @@ jumbo_source_set("fxge") {
test("pdfium_unittests") {
testonly = true
sources = [
- "core/fdrm/crypto/fx_crypt_unittest.cpp",
+ "core/fdrm/fx_crypt_unittest.cpp",
"core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp",
"core/fpdfapi/font/cpdf_cmapparser_unittest.cpp",
"core/fpdfapi/font/cpdf_tounicodemap_unittest.cpp",
diff --git a/core/fdrm/crypto/fx_crypt.cpp b/core/fdrm/fx_crypt.cpp
index d53fa6ba7a..e31bde992c 100644
--- a/core/fdrm/crypto/fx_crypt.cpp
+++ b/core/fdrm/fx_crypt.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include <utility>
diff --git a/core/fdrm/crypto/fx_crypt.h b/core/fdrm/fx_crypt.h
index 0c7484c256..4e8a7132a8 100644
--- a/core/fdrm/crypto/fx_crypt.h
+++ b/core/fdrm/fx_crypt.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef CORE_FDRM_CRYPTO_FX_CRYPT_H_
-#define CORE_FDRM_CRYPTO_FX_CRYPT_H_
+#ifndef CORE_FDRM_FX_CRYPT_H_
+#define CORE_FDRM_FX_CRYPT_H_
#include "core/fxcrt/fx_system.h"
@@ -114,4 +114,4 @@ void CRYPT_SHA512Generate(const uint8_t* data,
uint32_t size,
uint8_t digest[64]);
-#endif // CORE_FDRM_CRYPTO_FX_CRYPT_H_
+#endif // CORE_FDRM_FX_CRYPT_H_
diff --git a/core/fdrm/crypto/fx_crypt_aes.cpp b/core/fdrm/fx_crypt_aes.cpp
index 467cc97213..3397574fac 100644
--- a/core/fdrm/crypto/fx_crypt_aes.cpp
+++ b/core/fdrm/fx_crypt_aes.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#define mulby2(x) (((x & 0x7F) << 1) ^ (x & 0x80 ? 0x1B : 0))
#define GET_32BIT_MSB_FIRST(cp) \
@@ -515,9 +515,7 @@ void aes_decrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
#undef MAKEWORD
#undef LASTWORD
-void aes_setup(CRYPT_aes_context* ctx,
- const unsigned char* key,
- int keylen) {
+void aes_setup(CRYPT_aes_context* ctx, const unsigned char* key, int keylen) {
ASSERT(keylen == 16 || keylen == 24 || keylen == 32);
int Nk = keylen / 4;
ctx->Nb = 4;
diff --git a/core/fdrm/crypto/fx_crypt_sha.cpp b/core/fdrm/fx_crypt_sha.cpp
index 31742e79c6..573edb8042 100644
--- a/core/fdrm/crypto/fx_crypt_sha.cpp
+++ b/core/fdrm/fx_crypt_sha.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#define rol(x, y) (((x) << (y)) | (((unsigned int)x) >> (32 - y)))
diff --git a/core/fdrm/crypto/fx_crypt_unittest.cpp b/core/fdrm/fx_crypt_unittest.cpp
index e7f05b2939..b6389d1e5e 100644
--- a/core/fdrm/crypto/fx_crypt_unittest.cpp
+++ b/core/fdrm/fx_crypt_unittest.cpp
@@ -4,7 +4,7 @@
// Originally from chromium's /src/base/md5_unittest.cc.
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include <memory>
#include <string>
diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp
index b41a8466b1..2cb87e7213 100644
--- a/core/fpdfapi/page/cpdf_docpagedata.cpp
+++ b/core/fpdfapi/page/cpdf_docpagedata.cpp
@@ -11,7 +11,7 @@
#include <set>
#include <utility>
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "core/fpdfapi/cpdf_modulemgr.h"
#include "core/fpdfapi/font/cpdf_type1font.h"
#include "core/fpdfapi/page/cpdf_iccprofile.h"
diff --git a/core/fpdfapi/parser/cpdf_crypto_handler.cpp b/core/fpdfapi/parser/cpdf_crypto_handler.cpp
index 4e24c66a4f..4783e40cbb 100644
--- a/core/fpdfapi/parser/cpdf_crypto_handler.cpp
+++ b/core/fpdfapi/parser/cpdf_crypto_handler.cpp
@@ -12,7 +12,7 @@
#include <stack>
#include <utility>
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "core/fpdfapi/edit/cpdf_encryptor.h"
#include "core/fpdfapi/edit/cpdf_flateencoder.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
diff --git a/core/fpdfapi/parser/cpdf_crypto_handler.h b/core/fpdfapi/parser/cpdf_crypto_handler.h
index be2ba16e00..0704f610b1 100644
--- a/core/fpdfapi/parser/cpdf_crypto_handler.h
+++ b/core/fpdfapi/parser/cpdf_crypto_handler.h
@@ -9,7 +9,7 @@
#include <memory>
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "core/fxcrt/cfx_binarybuf.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_string.h"
diff --git a/core/fpdfapi/parser/cpdf_security_handler.cpp b/core/fpdfapi/parser/cpdf_security_handler.cpp
index 079aeefef0..cb946303de 100644
--- a/core/fpdfapi/parser/cpdf_security_handler.cpp
+++ b/core/fpdfapi/parser/cpdf_security_handler.cpp
@@ -12,7 +12,7 @@
#include <utility>
#include <vector>
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_crypto_handler.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
diff --git a/fpdfsdk/fpdf_attachment.cpp b/fpdfsdk/fpdf_attachment.cpp
index e73678d751..de7389d14e 100644
--- a/fpdfsdk/fpdf_attachment.cpp
+++ b/fpdfsdk/fpdf_attachment.cpp
@@ -8,7 +8,7 @@
#include <utility>
#include "constants/stream_dict_common.h"
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "core/fpdfapi/parser/cpdf_array.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
#include "core/fpdfapi/parser/cpdf_document.h"
diff --git a/fxjs/cjs_globaldata.cpp b/fxjs/cjs_globaldata.cpp
index 614ae15858..0c84d1db72 100644
--- a/fxjs/cjs_globaldata.cpp
+++ b/fxjs/cjs_globaldata.cpp
@@ -8,7 +8,7 @@
#include <utility>
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index 43f077ca01..10b944d608 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -12,7 +12,7 @@
#include <string>
#include <utility>
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "public/cpp/fpdf_scopers.h"
#include "public/fpdf_dataavail.h"
#include "public/fpdf_edit.h"
diff --git a/testing/test_support.cpp b/testing/test_support.cpp
index 2b6f436c32..8af40a4482 100644
--- a/testing/test_support.cpp
+++ b/testing/test_support.cpp
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <string.h>
-#include "core/fdrm/crypto/fx_crypt.h"
+#include "core/fdrm/fx_crypt.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_string.h"
#include "testing/utils/path_service.h"