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>
diff --git a/BUILD.gn b/BUILD.gn
index 068d412..87c3849 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -192,10 +192,10 @@
 
 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 @@
 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
similarity index 99%
rename from core/fdrm/crypto/fx_crypt.cpp
rename to core/fdrm/fx_crypt.cpp
index d53fa6b..e31bde9 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
similarity index 96%
rename from core/fdrm/crypto/fx_crypt.h
rename to core/fdrm/fx_crypt.h
index 0c7484c..4e8a713 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 @@
                           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
similarity index 99%
rename from core/fdrm/crypto/fx_crypt_aes.cpp
rename to core/fdrm/fx_crypt_aes.cpp
index 467cc97..3397574 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 @@
 #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
similarity index 99%
rename from core/fdrm/crypto/fx_crypt_sha.cpp
rename to core/fdrm/fx_crypt_sha.cpp
index 31742e7..573edb8 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
similarity index 99%
rename from core/fdrm/crypto/fx_crypt_unittest.cpp
rename to core/fdrm/fx_crypt_unittest.cpp
index e7f05b2..b6389d1 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 b41a846..2cb87e7 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 4e24c66..4783e40 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 be2ba16..0704f61 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 079aeef..cb94630 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 e73678d..de7389d 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 614ae15..0c84d1d 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 43f077c..10b944d 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 2b6f436..8af40a4 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"