Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: core/src/fdrm/crypto/fx_crypt.cpp

Issue 1152693005: Merge to XFA: Move fx_safe_types.h to include/ directory. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix BUILD.gn Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fdrm/fx_crypt.h"
7 #include "../../../include/fxcrt/fx_basic.h" 8 #include "../../../include/fxcrt/fx_basic.h"
8 #include "../../../include/fdrm/fx_crypt.h" 9 #include "../../../include/fxcrt/fx_safe_types.h"
9 #include "../../../src/fxcrt/fx_safe_types.h"
10 10
11 #ifdef __cplusplus 11 #ifdef __cplusplus
12 extern "C" { 12 extern "C" {
13 #endif 13 #endif
14 struct rc4_state { 14 struct rc4_state {
15 int x, y, m[256]; 15 int x, y, m[256];
16 }; 16 };
17 void CRYPT_ArcFourSetup(void* context, FX_LPCBYTE key, FX_DWORD length ) 17 void CRYPT_ArcFourSetup(void* context, FX_LPCBYTE key, FX_DWORD length )
18 { 18 {
19 rc4_state *s = (rc4_state*)context; 19 rc4_state *s = (rc4_state*)context;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 CRYPT_MD5Finish(&ctx, digest); 252 CRYPT_MD5Finish(&ctx, digest);
253 } 253 }
254 static FX_BOOL (*g_PubKeyDecryptor)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE d ata_buf, FX_DWORD& data_len) = NULL; 254 static FX_BOOL (*g_PubKeyDecryptor)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE d ata_buf, FX_DWORD& data_len) = NULL;
255 void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(FX_LPCBYTE pData, FX_DWORD size, F X_LPBYTE data_buf, FX_DWORD& data_len)) 255 void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(FX_LPCBYTE pData, FX_DWORD size, F X_LPBYTE data_buf, FX_DWORD& data_len))
256 { 256 {
257 g_PubKeyDecryptor = func; 257 g_PubKeyDecryptor = func;
258 } 258 }
259 #ifdef __cplusplus 259 #ifdef __cplusplus
260 }; 260 };
261 #endif 261 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698