diff options
author | tsepez <tsepez@chromium.org> | 2016-11-21 14:29:12 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-21 14:29:12 -0800 |
commit | d88090fb780480217af37273e7abb01ae48e322b (patch) | |
tree | 6c4287e91c123fe8e9c281be996ea62dc4615dae /core/fdrm/crypto/fx_crypt.h | |
parent | bcd3e538f170a5ab2c3295f1a3b0062781d384a5 (diff) | |
download | pdfium-d88090fb780480217af37273e7abb01ae48e322b.tar.xz |
Remove some void* usage in fx_crypt.cpp
Review-Url: https://codereview.chromium.org/2521693003
Diffstat (limited to 'core/fdrm/crypto/fx_crypt.h')
-rw-r--r-- | core/fdrm/crypto/fx_crypt.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/core/fdrm/crypto/fx_crypt.h b/core/fdrm/crypto/fx_crypt.h index a7cb4a51bc..fe043dcb12 100644 --- a/core/fdrm/crypto/fx_crypt.h +++ b/core/fdrm/crypto/fx_crypt.h @@ -13,6 +13,12 @@ extern "C" { #endif +struct CRYPT_rc4_context { + int32_t x; + int32_t y; + int32_t m[256]; +}; + struct CRYPT_md5_context { uint32_t total[2]; uint32_t state[4]; @@ -23,8 +29,12 @@ void CRYPT_ArcFourCryptBlock(uint8_t* data, uint32_t size, const uint8_t* key, uint32_t keylen); -void CRYPT_ArcFourSetup(void* context, const uint8_t* key, uint32_t length); -void CRYPT_ArcFourCrypt(void* context, uint8_t* data, uint32_t size); +void CRYPT_ArcFourSetup(CRYPT_rc4_context* context, + const uint8_t* key, + uint32_t length); +void CRYPT_ArcFourCrypt(CRYPT_rc4_context* context, + uint8_t* data, + uint32_t size); void CRYPT_AESSetKey(void* context, uint32_t blocklen, const uint8_t* key, @@ -40,9 +50,11 @@ void CRYPT_AESEncrypt(void* context, const uint8_t* src, uint32_t size); void CRYPT_MD5Generate(const uint8_t* data, uint32_t size, uint8_t digest[16]); -void CRYPT_MD5Start(void* context); -void CRYPT_MD5Update(void* context, const uint8_t* data, uint32_t size); -void CRYPT_MD5Finish(void* context, uint8_t digest[16]); +void CRYPT_MD5Start(CRYPT_md5_context* context); +void CRYPT_MD5Update(CRYPT_md5_context* context, + const uint8_t* data, + uint32_t size); +void CRYPT_MD5Finish(CRYPT_md5_context* context, uint8_t digest[16]); void CRYPT_SHA1Generate(const uint8_t* data, uint32_t size, uint8_t digest[20]); void CRYPT_SHA1Start(void* context); void CRYPT_SHA1Update(void* context, const uint8_t* data, uint32_t size); |