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 typedef struct { | 12 typedef struct { |
13 unsigned int h[5]; | 13 unsigned int h[5]; |
14 unsigned char block[64]; | 14 unsigned char block[64]; |
15 int blkused; | 15 int blkused; |
16 unsigned int lenhi, lenlo; | 16 unsigned int lenhi, lenlo; |
17 } SHA_State; | 17 } SHA_State; |
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 uint32_t size, | 648 uint32_t size, |
649 uint8_t digest[64]) { | 649 uint8_t digest[64]) { |
650 sha384_context context; | 650 sha384_context context; |
651 CRYPT_SHA512Start(&context); | 651 CRYPT_SHA512Start(&context); |
652 CRYPT_SHA512Update(&context, data, size); | 652 CRYPT_SHA512Update(&context, data, size); |
653 CRYPT_SHA512Finish(&context, digest); | 653 CRYPT_SHA512Finish(&context, digest); |
654 } | 654 } |
655 #ifdef __cplusplus | 655 #ifdef __cplusplus |
656 }; | 656 }; |
657 #endif | 657 #endif |
OLD | NEW |