Need object when reading/writing encrypted PDFs (to decrypt/encrypt strings),

RC4 writing is now working, AES-128 needs work, AES-256 hasn't been done yet.
This commit is contained in:
Michael R Sweet
2021-10-23 18:08:16 -04:00
parent 3af39d5d1f
commit dd56317635
8 changed files with 175 additions and 62 deletions

View File

@@ -970,7 +970,7 @@ do_unit_tests(void)
fputs("_pdfioValueRead(complex_dict): ", stdout);
s = complex_dict;
_pdfioTokenInit(&tb, inpdf, (_pdfio_tconsume_cb_t)token_consume_cb, (_pdfio_tpeek_cb_t)token_peek_cb, (void *)&s);
if (_pdfioValueRead(inpdf, &tb, &value))
if (_pdfioValueRead(inpdf, NULL, &tb, &value))
{
// TODO: Check value...
fputs("PASS: ", stdout);
@@ -984,7 +984,7 @@ do_unit_tests(void)
fputs("_pdfioValueRead(cid_dict): ", stdout);
s = cid_dict;
_pdfioTokenInit(&tb, inpdf, (_pdfio_tconsume_cb_t)token_consume_cb, (_pdfio_tpeek_cb_t)token_peek_cb, (void *)&s);
if (_pdfioValueRead(inpdf, &tb, &value))
if (_pdfioValueRead(inpdf, NULL, &tb, &value))
{
// TODO: Check value...
fputs("PASS: ", stdout);