Skip to content

Commit ae09808

Browse files
CopilotAndreRenaud
andauthored
Add PDF encryption support: pdf_save_encrypted with RC4 40-bit encryption (#169)
* Add PDF encryption support: pdf_save_encrypted with RC4 40-bit (Standard Security Handler Rev 2)" Agent-Logs-Url: https://github.com/AndreRenaud/PDFGen/sessions/8d643c20-dba3-48bc-ae2b-9cfe06637812 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Andre Renaud <andre@ignavus.net>
1 parent e4aef83 commit ae09808

8 files changed

Lines changed: 600 additions & 51 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
name: pdfgen-main-artifacts
3636
path: |
3737
output.pdf
38+
output_encrypted.pdf
3839
pdfgen.h
3940
pdfgen.o
4041
doc/html/
@@ -56,6 +57,7 @@ jobs:
5657
cp testprog.exe testprog-64.exe
5758
testprog-64
5859
cp output.pdf output-win64.pdf
60+
cp output_encrypted.pdf output_encrypted-win64.pdf
5961
- name: make x86
6062
shell: cmd
6163
run: |
@@ -65,13 +67,16 @@ jobs:
6567
cp testprog.exe testprog-32.exe
6668
testprog-32
6769
cp output.pdf output-win32.pdf
70+
cp output_encrypted.pdf output_encrypted-win32.pdf
6871
- name: Upload artifacts
6972
uses: actions/upload-artifact@v4
7073
with:
7174
name: pdfgen-win32-artifacts
7275
path: |
7376
output-win32.pdf
7477
output-win64.pdf
78+
output_encrypted-win32.pdf
79+
output_encrypted-win64.pdf
7580
testprog-32.exe
7681
testprog-64.exe
7782
@@ -80,4 +85,17 @@ jobs:
8085
steps:
8186
- uses: actions/checkout@v6
8287
- name: make
83-
run: make
88+
run: |
89+
make
90+
make testprog
91+
./testprog
92+
cp output.pdf output-macos.pdf
93+
cp output_encrypted.pdf output_encrypted-macos.pdf
94+
- name: Upload artifacts
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: pdfgen-macos-artifacts
98+
path: |
99+
output-macos.pdf
100+
output_encrypted-macos.pdf
101+
testprog

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ docs/html
1313
docs/latex
1414
doxygen.log
1515
tests/massive-file
16+
output_encrypted.pdf
17+
output_encrypted.txt

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,5 @@ podman-shell: podman-image
107107
.PHONY: default check coverage example-check fuzz-check format docs podman-image podman-build-win32 podman-infer podman-build podman-test podman-check podman-fuzz-check podman-docs podman-coverage podman-shell clean
108108

109109
clean:
110-
rm -f *$(O_SUFFIX) tests/*$(O_SUFFIX) $(TESTPROG) *.gcda *.gcno *.gcov tests/*.gcda tests/*.gcno output.pdf output.txt tests/fuzz-header tests/fuzz-text tests/fuzz-image-data tests/fuzz-image-file test/massive-file output.pdftk fuzz-image-file.pdf fuzz-image-data.pdf fuzz-image.dat doxygen.log tests/penguin.c fuzz.pdf output.ps output.ppm output-barcodes.txt
110+
rm -f *$(O_SUFFIX) tests/*$(O_SUFFIX) $(TESTPROG) *.gcda *.gcno *.gcov tests/*.gcda tests/*.gcno output.pdf output_encrypted.pdf output.txt tests/fuzz-header tests/fuzz-text tests/fuzz-image-data tests/fuzz-image-file test/massive-file output.pdftk fuzz-image-file.pdf fuzz-image-data.pdf fuzz-image.dat doxygen.log tests/penguin.c fuzz.pdf output.ps output.ppm output-barcodes.txt
111111
rm -rf docs/html docs/latex fuzz-artifacts infer-out coverage-html

0 commit comments

Comments
 (0)