summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_crypto_handler.h
AgeCommit message (Collapse)Author
2017-10-03Move initialization of CPDF_CryptoHandler into CPDF_SytnaxParser initialization.Artem Strygin
Change-Id: I70d04f38767f2c17c41407fc9b4fc25519ba32f4 Reviewed-on: https://pdfium-review.googlesource.com/15330 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-03Change the ownership of the CPDF_CryptoHandler.Artem Strygin
Change-Id: I3ae8337c1a77063470eb5baa97db62ea2e90688b Reviewed-on: https://pdfium-review.googlesource.com/15230 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-02Implement CPDF_CryptoHandler::DecryptObjectArtem Strygin
Decryption logic has been extracted from CPDF_SyntaxParser::GetObjectBody into CPDF_CryptoHandler::DecryptObject Performance comparison results: https://pdfium-review.googlesource.com/c/pdfium/+/12970 Change-Id: Iaeaed56b7f96166bbbcf6db162192d2ba9af4698 Reviewed-on: https://pdfium-review.googlesource.com/12971 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-09-21Rename CFX_RetainPtr to RetainPtrDan Sinclair
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-09-18Convert string class namesRyan Harrison
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-09-12Don't attempt to decrypt AES streams that are too shortchromium/3214Ryan Harrison
When reading a stream, if it is encrypted using an AES cipher it must be atleast 16 bytes long aka 128 bits, other wise it is malformed. BUG=chromium:763585 Change-Id: Ied7c36978f1eb24aeda93a184527b6d6a191e5c3 Reviewed-on: https://pdfium-review.googlesource.com/13751 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-30Move CFX_BinaryBuf out of fx_basicDan Sinclair
This CL splits the CFX_BinaryBuf out of fx_basic into its own files. The various includes have been updated. Change-Id: I0fa616eeb4df6dd229c02dc3a0597b3dced59425 Reviewed-on: https://pdfium-review.googlesource.com/12412 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-06Remove type-unsafe void* / uint8_t* usage in fx_crypt.hTom Sepez
Consolidate all of the sha2 contexts while we're at it, the one with the largest buf is suitable for use by all the others. Change-Id: Iace6cd8ca4405f75f78842a1559c3a2478910218 Reviewed-on: https://pdfium-review.googlesource.com/4994 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-04-13Refcount CPDF_CryptoHandlerchromium/3076chromium/3075chromium/3074chromium/3073chromium/3072Tom Sepez
Avoid tracking ownership via m_bLocalCryptoHandler. Also remove m_bEncryptCloned, as it is always false. Replace some methods with direct calls to underlying code. Change-Id: Ifa9d6f721c59d07e3b8e258f76832ca9f2ea0fc9 Reviewed-on: https://pdfium-review.googlesource.com/4111 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-04-07Cleanup string passing in core/fpdf*Tom Sepez
Return strings where possible. Add missing consts to strings passed by ref. Convert non-const cases to pointers. Rename a few methods to be clearer. Change-Id: I86569bc1744f539e6dd67fc73649b272c016328c Reviewed-on: https://pdfium-review.googlesource.com/3951 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2016-11-02Remove FX_BOOL from coretsepez
Review-Url: https://codereview.chromium.org/2477443002
2016-10-04Move core/fpdfapi/fpdf_parser to core/fpdfapi/parserdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2392603004