| Index: core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h
|
| diff --git a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h
|
| index 8c1629c486e876c2d45f32a03da2779bd3be9cd1..dfbf6a34f9869bc3101a0a806bbcd2eaf4325f8b 100644
|
| --- a/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h
|
| +++ b/core/fpdfapi/fpdf_parser/cpdf_standard_security_handler.h
|
| @@ -22,7 +22,7 @@ class CPDF_StandardSecurityHandler : public IPDF_SecurityHandler {
|
|
|
| // IPDF_SecurityHandler:
|
| FX_BOOL OnInit(CPDF_Parser* pParser, CPDF_Dictionary* pEncryptDict) override;
|
| - FX_DWORD GetPermissions() override;
|
| + uint32_t GetPermissions() override;
|
| FX_BOOL GetCryptInfo(int& cipher,
|
| const uint8_t*& buffer,
|
| int& keylen) override;
|
| @@ -32,22 +32,22 @@ class CPDF_StandardSecurityHandler : public IPDF_SecurityHandler {
|
| void OnCreate(CPDF_Dictionary* pEncryptDict,
|
| CPDF_Array* pIdArray,
|
| const uint8_t* user_pass,
|
| - FX_DWORD user_size,
|
| + uint32_t user_size,
|
| const uint8_t* owner_pass,
|
| - FX_DWORD owner_size,
|
| - FX_DWORD type = PDF_ENCRYPT_CONTENT);
|
| + uint32_t owner_size,
|
| + uint32_t type = PDF_ENCRYPT_CONTENT);
|
|
|
| void OnCreate(CPDF_Dictionary* pEncryptDict,
|
| CPDF_Array* pIdArray,
|
| const uint8_t* user_pass,
|
| - FX_DWORD user_size,
|
| - FX_DWORD type = PDF_ENCRYPT_CONTENT);
|
| + uint32_t user_size,
|
| + uint32_t type = PDF_ENCRYPT_CONTENT);
|
|
|
| CFX_ByteString GetUserPassword(const uint8_t* owner_pass,
|
| - FX_DWORD pass_size,
|
| + uint32_t pass_size,
|
| int32_t key_len);
|
| int CheckPassword(const uint8_t* password,
|
| - FX_DWORD pass_size,
|
| + uint32_t pass_size,
|
| FX_BOOL bOwner,
|
| uint8_t* key,
|
| int key_len);
|
| @@ -55,48 +55,48 @@ class CPDF_StandardSecurityHandler : public IPDF_SecurityHandler {
|
| private:
|
| FX_BOOL LoadDict(CPDF_Dictionary* pEncryptDict);
|
| FX_BOOL LoadDict(CPDF_Dictionary* pEncryptDict,
|
| - FX_DWORD type,
|
| + uint32_t type,
|
| int& cipher,
|
| int& key_len);
|
|
|
| FX_BOOL CheckUserPassword(const uint8_t* password,
|
| - FX_DWORD pass_size,
|
| + uint32_t pass_size,
|
| FX_BOOL bIgnoreEncryptMeta,
|
| uint8_t* key,
|
| int32_t key_len);
|
|
|
| FX_BOOL CheckOwnerPassword(const uint8_t* password,
|
| - FX_DWORD pass_size,
|
| + uint32_t pass_size,
|
| uint8_t* key,
|
| int32_t key_len);
|
| FX_BOOL AES256_CheckPassword(const uint8_t* password,
|
| - FX_DWORD size,
|
| + uint32_t size,
|
| FX_BOOL bOwner,
|
| uint8_t* key);
|
| void AES256_SetPassword(CPDF_Dictionary* pEncryptDict,
|
| const uint8_t* password,
|
| - FX_DWORD size,
|
| + uint32_t size,
|
| FX_BOOL bOwner,
|
| const uint8_t* key);
|
| void AES256_SetPerms(CPDF_Dictionary* pEncryptDict,
|
| - FX_DWORD permission,
|
| + uint32_t permission,
|
| FX_BOOL bEncryptMetadata,
|
| const uint8_t* key);
|
| void OnCreate(CPDF_Dictionary* pEncryptDict,
|
| CPDF_Array* pIdArray,
|
| const uint8_t* user_pass,
|
| - FX_DWORD user_size,
|
| + uint32_t user_size,
|
| const uint8_t* owner_pass,
|
| - FX_DWORD owner_size,
|
| + uint32_t owner_size,
|
| FX_BOOL bDefault,
|
| - FX_DWORD type);
|
| + uint32_t type);
|
| FX_BOOL CheckSecurity(int32_t key_len);
|
|
|
| int m_Version;
|
| int m_Revision;
|
| CPDF_Parser* m_pParser;
|
| CPDF_Dictionary* m_pEncryptDict;
|
| - FX_DWORD m_Permissions;
|
| + uint32_t m_Permissions;
|
| int m_Cipher;
|
| uint8_t m_EncryptKey[32];
|
| int m_KeyLen;
|
|
|