OLD | NEW |
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 Loading... |
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 |
OLD | NEW |