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 "core/fdrm/crypto/include/fx_crypt.h" | 7 #include "core/fdrm/crypto/fx_crypt.h" |
8 | 8 |
9 #ifdef __cplusplus | 9 #ifdef __cplusplus |
10 extern "C" { | 10 extern "C" { |
11 #endif | 11 #endif |
12 #define MAX_NR 14 | 12 #define MAX_NR 14 |
13 #define MAX_NK 8 | 13 #define MAX_NK 8 |
14 #define MAX_NB 8 | 14 #define MAX_NB 8 |
15 #define mulby2(x) (((x & 0x7F) << 1) ^ (x & 0x80 ? 0x1B : 0)) | 15 #define mulby2(x) (((x & 0x7F) << 1) ^ (x & 0x80 ? 0x1B : 0)) |
16 #define GET_32BIT_MSB_FIRST(cp) \ | 16 #define GET_32BIT_MSB_FIRST(cp) \ |
17 (((unsigned long)(unsigned char)(cp)[3]) | \ | 17 (((unsigned long)(unsigned char)(cp)[3]) | \ |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 } | 824 } |
825 void CRYPT_AESEncrypt(void* context, | 825 void CRYPT_AESEncrypt(void* context, |
826 uint8_t* dest, | 826 uint8_t* dest, |
827 const uint8_t* src, | 827 const uint8_t* src, |
828 uint32_t len) { | 828 uint32_t len) { |
829 aes_encrypt_cbc(dest, src, len, (AESContext*)context); | 829 aes_encrypt_cbc(dest, src, len, (AESContext*)context); |
830 } | 830 } |
831 #ifdef __cplusplus | 831 #ifdef __cplusplus |
832 }; | 832 }; |
833 #endif | 833 #endif |
OLD | NEW |