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

Side by Side Diff: core/fdrm/crypto/fx_crypt.h

Issue 2517153003: Add unit test for fdrm's MD5 (Closed)
Patch Set: year Created 4 years, 1 month 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
« no previous file with comments | « BUILD.gn ('k') | core/fdrm/crypto/fx_crypt.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CORE_FDRM_CRYPTO_FX_CRYPT_H_ 7 #ifndef CORE_FDRM_CRYPTO_FX_CRYPT_H_
8 #define CORE_FDRM_CRYPTO_FX_CRYPT_H_ 8 #define CORE_FDRM_CRYPTO_FX_CRYPT_H_
9 9
10 #include "core/fxcrt/fx_system.h" 10 #include "core/fxcrt/fx_system.h"
11 11
12 #ifdef __cplusplus 12 #ifdef __cplusplus
13 extern "C" { 13 extern "C" {
14 #endif 14 #endif
15 15
16 struct CRYPT_md5_context {
17 uint32_t total[2];
18 uint32_t state[4];
19 uint8_t buffer[64];
20 };
21
16 void CRYPT_ArcFourCryptBlock(uint8_t* data, 22 void CRYPT_ArcFourCryptBlock(uint8_t* data,
17 uint32_t size, 23 uint32_t size,
18 const uint8_t* key, 24 const uint8_t* key,
19 uint32_t keylen); 25 uint32_t keylen);
20 void CRYPT_ArcFourSetup(void* context, const uint8_t* key, uint32_t length); 26 void CRYPT_ArcFourSetup(void* context, const uint8_t* key, uint32_t length);
21 void CRYPT_ArcFourCrypt(void* context, uint8_t* data, uint32_t size); 27 void CRYPT_ArcFourCrypt(void* context, uint8_t* data, uint32_t size);
22 void CRYPT_AESSetKey(void* context, 28 void CRYPT_AESSetKey(void* context,
23 uint32_t blocklen, 29 uint32_t blocklen,
24 const uint8_t* key, 30 const uint8_t* key,
25 uint32_t keylen, 31 uint32_t keylen,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void CRYPT_SetPubKeyDecryptor(bool (*func)(const uint8_t* pData, 68 void CRYPT_SetPubKeyDecryptor(bool (*func)(const uint8_t* pData,
63 uint32_t size, 69 uint32_t size,
64 uint8_t* data_buf, 70 uint8_t* data_buf,
65 uint32_t& data_len)); 71 uint32_t& data_len));
66 72
67 #ifdef __cplusplus 73 #ifdef __cplusplus
68 }; 74 };
69 #endif 75 #endif
70 76
71 #endif // CORE_FDRM_CRYPTO_FX_CRYPT_H_ 77 #endif // CORE_FDRM_CRYPTO_FX_CRYPT_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | core/fdrm/crypto/fx_crypt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698