Gunnsteinn Hall
f8ac397bdf
NewPdfReaderLazy supports reading PDF files in lazy-load mode ( #409 )
...
* Lazy loading support NewPdfReaderLazy.
* Change colorspace and annotations loading to lazy. Clean up page object loading.
* Clear up reference resolving and remove redundant traceToObject function.
* Add IsLogLevel function to logger. Can be used to avoid calling resource intensive functions except when running trace only.
2019-04-14 22:22:41 +00:00
Denys Smirnov
3687c83b37
errors should start with a lower case
2018-12-15 18:49:15 +05:00
Denys Smirnov
9f0df8945d
don't use XXX for TODOs
2018-12-09 21:39:11 +02:00
Gunnsteinn Hall
3454ec67dc
Merge branch 'v3' into v3-enhance-forms
2018-10-13 11:32:20 +00:00
Denys Smirnov
84284c88ec
security: add missing license headers, more documentation
2018-10-08 01:04:56 +03:00
Denys Smirnov
7bd4ba688d
core: split crypt filter methods into a separate package
2018-10-08 00:18:18 +03:00
Denys Smirnov
42df346e69
core: split security handlers into a separate package
2018-10-08 00:18:18 +03:00
Denys Smirnov
68d20968d3
core: move encryption dictionary encoder and decoder to it's own type
2018-10-08 00:18:18 +03:00
Denys Smirnov
1c19ba9e96
core: decouple security handlers with different revisions from PdfCrypt
2018-10-08 00:18:18 +03:00
Denys Smirnov
7e9f3dd7e2
core: unexport remaining PdfCrypt methods
2018-10-08 00:18:18 +03:00
Denys Smirnov
fd9b3746de
core: unexport remaining PdfCrypt fields
2018-10-08 00:18:18 +03:00
Denys Smirnov
bccaa87cdc
core: refactor encryption and decryption types
2018-10-08 00:18:18 +03:00
Denys Smirnov
b5288e7ddc
core: change permissions type to a bitmask
2018-10-08 00:18:18 +03:00
Denys Smirnov
ef64bef191
core: permissions field is uint32 according to the spec
2018-10-08 00:18:18 +03:00
Denys Smirnov
418b99b4d8
core: detect old copies of Encrypt dictionary; fix #215
2018-09-29 00:16:57 +03:00
Denys Smirnov
d73bd8d1d2
core: correctly handle encryption of xref streams and trailer fields
2018-09-26 04:54:00 +03:00
Gunnsteinn Hall
6cafab4121
Merge branch 'master' into v3
2018-09-25 23:37:11 +00:00
Denys Smirnov
760f58b954
core: add doc comments for CFMs
2018-09-26 02:16:17 +03:00
Denys Smirnov
4b01f8f6ae
update code after merge with master
2018-09-26 01:46:13 +03:00
Denys Smirnov
acd4308d56
Merge branch 'refactor' into v3
...
# Conflicts:
# pdf/core/crypt.go
# pdf/model/writer.go
2018-09-26 01:08:19 +03:00
Denys Smirnov
b3c45a550a
core: refactor crypt filter selection code
2018-09-26 00:52:05 +03:00
Denys Smirnov
be03592b2a
core: move CFM to separate structs that implement a common interface
2018-09-26 00:52:05 +03:00
Denys Smirnov
7b2f6a6aab
core: do not decrypt XRef streams and the Encrypt dictionary; fix #205
2018-09-25 01:48:29 +03:00
Denys Smirnov
8450ebcef6
core: use type switch instead of if statements in encode and decode
2018-09-20 02:00:01 +03:00
Denys Smirnov
b7dcbc22de
core: fix standard crypt filter name; resolves issues with Adobe Reader
2018-09-19 23:48:50 +03:00
Denys Smirnov
eac1e899dc
core: allow to write documents with AES encryption
2018-09-19 06:02:15 +03:00
Denys Smirnov
839f9ea3bc
core: fix padding for AESv3
2018-09-19 06:01:29 +03:00
Denys Smirnov
d4b2490ea3
core: implement encryption algorithms 8-10; add tests for alg 8-13
2018-09-19 03:33:59 +03:00
Denys Smirnov
7fb4c91137
core: do not overwrite Perms then validating it
2018-09-19 03:12:49 +03:00
Denys Smirnov
e18e4b502c
core: move zero iv allocation to a separate function
2018-09-19 02:44:26 +03:00
Denys Smirnov
1371f91098
core: check metadata encryption flag in alg13
2018-09-19 02:43:32 +03:00
Denys Smirnov
c7cfde7c1f
core: move test data, add docs and link to the specification
2018-09-17 17:36:31 +03:00
Denys Smirnov
c08a13c234
core: optimize allocations for hash used in R=6
2018-09-16 17:10:04 +03:00
Denys Smirnov
8f4f1804b0
core: implement decoding of AESv3; resolves #30
2018-09-16 04:13:24 +03:00
Denys Smirnov
6510d0a853
core: algorithms 2a and 13 (decode file key and validate permissions)
2018-09-16 02:48:08 +03:00
Denys Smirnov
b76c8a56c4
core: implement algorithm 11 and 12 (password check for R=5 and R=6)
2018-09-16 00:34:13 +03:00
Gunnsteinn Hall
5b1b9bd504
PdfObjectArray change to struct and receivers added Elements, Get, Set, Len. Fixes to resulting broken code.
2018-07-15 17:52:53 +00:00
Gunnsteinn Hall
14ee80e1fe
Preserve and allow output of hexadecimal strings
...
Refactored PdfObjectString into a struct with bool flag for hex. Fixed any code broken by the change.
Unexported non-essential functions for crypto (not used by model). Can unexport more later or refactor to internal package.
2018-07-14 02:25:29 +00:00
Gunnsteinn Hall
ad47c116aa
Address core golint recommendations in crypt, io
2017-08-03 15:13:40 +00:00
Gunnsteinn Hall
7f83a4ea2f
Add bounds check in crypt, parser. Avoid division by zero.
2017-07-23 20:20:05 +00:00
Gunnsteinn Hall
3639b5c279
Add check for ID array length
2017-07-23 12:30:21 +00:00
Gunnsteinn Hall
71807ecfa4
Exposed a reader function to check access rights. Fixed incorrect bit name for AccessPermissions (LimitPrintQuality->FullPrintQuality). Fix in owner password authentication. Closes #51 .
2017-07-12 09:48:16 +00:00
Gunnsteinn Hall
10c3be8c95
Change PdfObjectDictionary from map to struct and introduce ordered keys. Syntax change. Fixes all around to accommodate changes. Also fixes in test cases. Closes #56 .
2017-07-08 21:04:13 +00:00
Gunnsteinn Hall
d25fa23fb0
Fix issue with unremoved AES decrypted padding bytes #44
2017-04-24 21:36:07 +00:00
Gunnsteinn Hall
90caacec66
Improved crypto handling for encrypt dicts with references
2017-03-29 15:54:50 +00:00
Gunnsteinn Hall
6516adddc4
Cleaning up logging, more debug -> trace log level
2017-03-02 18:06:32 +00:00
Gunnsteinn Hall
a0a9fa6289
Fix for invalid crypto lengths (given in bits rather than bytes) for compatibility
2016-12-02 22:32:13 +00:00
Gunnsteinn Hall
1564f8ab06
Updates and fixes from master merged in
2016-12-02 15:17:19 +00:00
Gunnsteinn Hall
f358b3e26f
Refactoring in progress
...
Currently compiles with tests, but not fully functional yet.
2016-09-09 15:02:52 +00:00
Gunnsteinn Hall
19fd98d667
Refactoring into core and model. (in process)
...
As the package was growing large, there is a need to clean up. Testing
to refactor into a core (basic pdf parsing and primitive objects) and a
higher level model package.
2016-09-08 17:53:45 +00:00