Added AES-128 and RC4 up to 128 bits on PDFProtectionTrait#36
Conversation
182ecf1 to
6df7bcf
Compare
…yption Added a link to the GitHub repository for PDF Protection.
|
This Trait causes an invalid stream ending Exception in tests on GitHub Actions: 1) Fawno\FPDF\Tests\Scripts\PDFProtectionTraitTest::testPDFProtectionTrait
Exception: invalid stream ending
/app/vendor/ddn/sapp/src/PDFObjectParser.php:361
/app/vendor/ddn/sapp/src/PDFObjectParser.php:451
/app/vendor/ddn/sapp/src/PDFObjectParser.php:150
/app/vendor/ddn/sapp/src/PDFUtilFnc.php:559
/app/vendor/ddn/sapp/src/PDFUtilFnc.php:470
/app/vendor/ddn/sapp/src/PDFDoc.php:255
/app/vendor/ddn/sapp/src/PDFDoc.php:749
/app/vendor/ddn/sapp/src/PDFDoc.php:793
/app/vendor/ddn/sapp/src/PDFDoc.php:918
/app/tests/TestCase.php:51
/app/tests/TestCase.php:67
/app/tests/TestCase.php:60
/app/tests/Scripts/PDFProtectionTraitTest.php:24This error predates this PR. |
|
Look at erikn69@f23fbd8 |
|
Rebase, I marked affected tests as incomplete. |
Revert 8c1dda9 |
Now I understand why the tests don't fail on my systems. For work reasons, I have OpenSSL's legacy algorithms enabled. |
Me too |
|
I tried encryption using AES and it seems that something breaks. // PDFProtection
$pdf->SetProtection(['print'], 'user', 'admin', 'AES');Result: PS: It seems to be a problem with the viewer; I tested it with the built-in Chrome and Firefox viewers and the generated file displays correctly. |
the original author initiated this process: klemenv/FPDF_Protection/fpdf_protection.php,
but it hasn't been published; it seems to be working correctly.