Commit 2213ed0c3dd1bcc5a62725190cca4a6ad8eb9d7f
1 parent
7608ff4e
Remove deprecated (pre-8.4.0) encryption APIs
Showing
4 changed files
with
0 additions
and
317 deletions
include/qpdf/QPDFWriter.hh
| ... | ... | @@ -432,44 +432,6 @@ class QPDFWriter |
| 432 | 432 | qpdf_r3_print_e print, |
| 433 | 433 | bool encrypt_metadata_aes); |
| 434 | 434 | |
| 435 | - // Pre qpdf 8.4.0 API | |
| 436 | - [[deprecated("see newer API above")]] QPDF_DLL void | |
| 437 | - setR3EncryptionParameters( | |
| 438 | - char const* user_password, | |
| 439 | - char const* owner_password, | |
| 440 | - bool allow_accessibility, | |
| 441 | - bool allow_extract, | |
| 442 | - qpdf_r3_print_e print, | |
| 443 | - qpdf_r3_modify_e modify); | |
| 444 | - [[deprecated("see newer API above")]] QPDF_DLL void | |
| 445 | - setR4EncryptionParameters( | |
| 446 | - char const* user_password, | |
| 447 | - char const* owner_password, | |
| 448 | - bool allow_accessibility, | |
| 449 | - bool allow_extract, | |
| 450 | - qpdf_r3_print_e print, | |
| 451 | - qpdf_r3_modify_e modify, | |
| 452 | - bool encrypt_metadata, | |
| 453 | - bool use_aes); | |
| 454 | - [[deprecated("see newer API above")]] QPDF_DLL void | |
| 455 | - setR5EncryptionParameters( | |
| 456 | - char const* user_password, | |
| 457 | - char const* owner_password, | |
| 458 | - bool allow_accessibility, | |
| 459 | - bool allow_extract, | |
| 460 | - qpdf_r3_print_e print, | |
| 461 | - qpdf_r3_modify_e modify, | |
| 462 | - bool encrypt_metadata); | |
| 463 | - [[deprecated("see newer API above")]] QPDF_DLL void | |
| 464 | - setR6EncryptionParameters( | |
| 465 | - char const* user_password, | |
| 466 | - char const* owner_password, | |
| 467 | - bool allow_accessibility, | |
| 468 | - bool allow_extract, | |
| 469 | - qpdf_r3_print_e print, | |
| 470 | - qpdf_r3_modify_e modify, | |
| 471 | - bool encrypt_metadata_aes); | |
| 472 | - | |
| 473 | 435 | // Create linearized output. Disables qdf mode, content |
| 474 | 436 | // normalization, and stream prefiltering. |
| 475 | 437 | QPDF_DLL | ... | ... |
include/qpdf/qpdf-c.h
| ... | ... | @@ -524,51 +524,6 @@ extern "C" { |
| 524 | 524 | enum qpdf_r3_print_e print, |
| 525 | 525 | QPDF_BOOL encrypt_metadata); |
| 526 | 526 | |
| 527 | - /* Pre 8.4.0 encryption API */ | |
| 528 | - QPDF_DLL | |
| 529 | - void qpdf_set_r3_encryption_parameters( | |
| 530 | - qpdf_data qpdf, | |
| 531 | - char const* user_password, | |
| 532 | - char const* owner_password, | |
| 533 | - QPDF_BOOL allow_accessibility, | |
| 534 | - QPDF_BOOL allow_extract, | |
| 535 | - enum qpdf_r3_print_e print, | |
| 536 | - enum qpdf_r3_modify_e modify); | |
| 537 | - | |
| 538 | - QPDF_DLL | |
| 539 | - void qpdf_set_r4_encryption_parameters( | |
| 540 | - qpdf_data qpdf, | |
| 541 | - char const* user_password, | |
| 542 | - char const* owner_password, | |
| 543 | - QPDF_BOOL allow_accessibility, | |
| 544 | - QPDF_BOOL allow_extract, | |
| 545 | - enum qpdf_r3_print_e print, | |
| 546 | - enum qpdf_r3_modify_e modify, | |
| 547 | - QPDF_BOOL encrypt_metadata, | |
| 548 | - QPDF_BOOL use_aes); | |
| 549 | - | |
| 550 | - QPDF_DLL | |
| 551 | - void qpdf_set_r5_encryption_parameters( | |
| 552 | - qpdf_data qpdf, | |
| 553 | - char const* user_password, | |
| 554 | - char const* owner_password, | |
| 555 | - QPDF_BOOL allow_accessibility, | |
| 556 | - QPDF_BOOL allow_extract, | |
| 557 | - enum qpdf_r3_print_e print, | |
| 558 | - enum qpdf_r3_modify_e modify, | |
| 559 | - QPDF_BOOL encrypt_metadata); | |
| 560 | - | |
| 561 | - QPDF_DLL | |
| 562 | - void qpdf_set_r6_encryption_parameters( | |
| 563 | - qpdf_data qpdf, | |
| 564 | - char const* user_password, | |
| 565 | - char const* owner_password, | |
| 566 | - QPDF_BOOL allow_accessibility, | |
| 567 | - QPDF_BOOL allow_extract, | |
| 568 | - enum qpdf_r3_print_e print, | |
| 569 | - enum qpdf_r3_modify_e modify, | |
| 570 | - QPDF_BOOL encrypt_metadata); | |
| 571 | - | |
| 572 | 527 | QPDF_DLL |
| 573 | 528 | void qpdf_set_linearization(qpdf_data qpdf, QPDF_BOOL value); |
| 574 | 529 | ... | ... |
libqpdf/QPDFWriter.cc
| ... | ... | @@ -396,31 +396,6 @@ QPDFWriter::setR3EncryptionParameters( |
| 396 | 396 | char const* owner_password, |
| 397 | 397 | bool allow_accessibility, |
| 398 | 398 | bool allow_extract, |
| 399 | - qpdf_r3_print_e print, | |
| 400 | - qpdf_r3_modify_e modify) | |
| 401 | -{ | |
| 402 | - std::set<int> clear; | |
| 403 | - interpretR3EncryptionParameters( | |
| 404 | - clear, | |
| 405 | - user_password, | |
| 406 | - owner_password, | |
| 407 | - allow_accessibility, | |
| 408 | - allow_extract, | |
| 409 | - true, | |
| 410 | - true, | |
| 411 | - true, | |
| 412 | - true, | |
| 413 | - print, | |
| 414 | - modify); | |
| 415 | - setEncryptionParameters(user_password, owner_password, 2, 3, 16, clear); | |
| 416 | -} | |
| 417 | - | |
| 418 | -void | |
| 419 | -QPDFWriter::setR3EncryptionParameters( | |
| 420 | - char const* user_password, | |
| 421 | - char const* owner_password, | |
| 422 | - bool allow_accessibility, | |
| 423 | - bool allow_extract, | |
| 424 | 399 | bool allow_assemble, |
| 425 | 400 | bool allow_annotate_and_form, |
| 426 | 401 | bool allow_form_filling, |
| ... | ... | @@ -449,35 +424,6 @@ QPDFWriter::setR4EncryptionParameters( |
| 449 | 424 | char const* owner_password, |
| 450 | 425 | bool allow_accessibility, |
| 451 | 426 | bool allow_extract, |
| 452 | - qpdf_r3_print_e print, | |
| 453 | - qpdf_r3_modify_e modify, | |
| 454 | - bool encrypt_metadata, | |
| 455 | - bool use_aes) | |
| 456 | -{ | |
| 457 | - std::set<int> clear; | |
| 458 | - interpretR3EncryptionParameters( | |
| 459 | - clear, | |
| 460 | - user_password, | |
| 461 | - owner_password, | |
| 462 | - allow_accessibility, | |
| 463 | - allow_extract, | |
| 464 | - true, | |
| 465 | - true, | |
| 466 | - true, | |
| 467 | - true, | |
| 468 | - print, | |
| 469 | - modify); | |
| 470 | - this->m->encrypt_use_aes = use_aes; | |
| 471 | - this->m->encrypt_metadata = encrypt_metadata; | |
| 472 | - setEncryptionParameters(user_password, owner_password, 4, 4, 16, clear); | |
| 473 | -} | |
| 474 | - | |
| 475 | -void | |
| 476 | -QPDFWriter::setR4EncryptionParameters( | |
| 477 | - char const* user_password, | |
| 478 | - char const* owner_password, | |
| 479 | - bool allow_accessibility, | |
| 480 | - bool allow_extract, | |
| 481 | 427 | bool allow_assemble, |
| 482 | 428 | bool allow_annotate_and_form, |
| 483 | 429 | bool allow_form_filling, |
| ... | ... | @@ -510,34 +456,6 @@ QPDFWriter::setR5EncryptionParameters( |
| 510 | 456 | char const* owner_password, |
| 511 | 457 | bool allow_accessibility, |
| 512 | 458 | bool allow_extract, |
| 513 | - qpdf_r3_print_e print, | |
| 514 | - qpdf_r3_modify_e modify, | |
| 515 | - bool encrypt_metadata) | |
| 516 | -{ | |
| 517 | - std::set<int> clear; | |
| 518 | - interpretR3EncryptionParameters( | |
| 519 | - clear, | |
| 520 | - user_password, | |
| 521 | - owner_password, | |
| 522 | - allow_accessibility, | |
| 523 | - allow_extract, | |
| 524 | - true, | |
| 525 | - true, | |
| 526 | - true, | |
| 527 | - true, | |
| 528 | - print, | |
| 529 | - modify); | |
| 530 | - this->m->encrypt_use_aes = true; | |
| 531 | - this->m->encrypt_metadata = encrypt_metadata; | |
| 532 | - setEncryptionParameters(user_password, owner_password, 5, 5, 32, clear); | |
| 533 | -} | |
| 534 | - | |
| 535 | -void | |
| 536 | -QPDFWriter::setR5EncryptionParameters( | |
| 537 | - char const* user_password, | |
| 538 | - char const* owner_password, | |
| 539 | - bool allow_accessibility, | |
| 540 | - bool allow_extract, | |
| 541 | 459 | bool allow_assemble, |
| 542 | 460 | bool allow_annotate_and_form, |
| 543 | 461 | bool allow_form_filling, |
| ... | ... | @@ -569,34 +487,6 @@ QPDFWriter::setR6EncryptionParameters( |
| 569 | 487 | char const* owner_password, |
| 570 | 488 | bool allow_accessibility, |
| 571 | 489 | bool allow_extract, |
| 572 | - qpdf_r3_print_e print, | |
| 573 | - qpdf_r3_modify_e modify, | |
| 574 | - bool encrypt_metadata) | |
| 575 | -{ | |
| 576 | - std::set<int> clear; | |
| 577 | - interpretR3EncryptionParameters( | |
| 578 | - clear, | |
| 579 | - user_password, | |
| 580 | - owner_password, | |
| 581 | - allow_accessibility, | |
| 582 | - allow_extract, | |
| 583 | - true, | |
| 584 | - true, | |
| 585 | - true, | |
| 586 | - true, | |
| 587 | - print, | |
| 588 | - modify); | |
| 589 | - this->m->encrypt_use_aes = true; | |
| 590 | - this->m->encrypt_metadata = encrypt_metadata; | |
| 591 | - setEncryptionParameters(user_password, owner_password, 5, 6, 32, clear); | |
| 592 | -} | |
| 593 | - | |
| 594 | -void | |
| 595 | -QPDFWriter::setR6EncryptionParameters( | |
| 596 | - char const* user_password, | |
| 597 | - char const* owner_password, | |
| 598 | - bool allow_accessibility, | |
| 599 | - bool allow_extract, | |
| 600 | 490 | bool allow_assemble, |
| 601 | 491 | bool allow_annotate_and_form, |
| 602 | 492 | bool allow_form_filling, | ... | ... |
libqpdf/qpdf-c.cc
| ... | ... | @@ -806,130 +806,6 @@ qpdf_set_r6_encryption_parameters2( |
| 806 | 806 | } |
| 807 | 807 | |
| 808 | 808 | void |
| 809 | -qpdf_set_r3_encryption_parameters( | |
| 810 | - qpdf_data qpdf, | |
| 811 | - char const* user_password, | |
| 812 | - char const* owner_password, | |
| 813 | - QPDF_BOOL allow_accessibility, | |
| 814 | - QPDF_BOOL allow_extract, | |
| 815 | - qpdf_r3_print_e print, | |
| 816 | - qpdf_r3_modify_e modify) | |
| 817 | -{ | |
| 818 | -#ifdef _MSC_VER | |
| 819 | -# pragma warning(disable : 4996) | |
| 820 | -#endif | |
| 821 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 822 | -# pragma GCC diagnostic push | |
| 823 | -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
| 824 | -#endif | |
| 825 | - qpdf->qpdf_writer->setR3EncryptionParameters( | |
| 826 | - user_password, | |
| 827 | - owner_password, | |
| 828 | - allow_accessibility != QPDF_FALSE, | |
| 829 | - allow_extract != QPDF_FALSE, | |
| 830 | - print, | |
| 831 | - modify); | |
| 832 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 833 | -# pragma GCC diagnostic pop | |
| 834 | -#endif | |
| 835 | -} | |
| 836 | - | |
| 837 | -void | |
| 838 | -qpdf_set_r4_encryption_parameters( | |
| 839 | - qpdf_data qpdf, | |
| 840 | - char const* user_password, | |
| 841 | - char const* owner_password, | |
| 842 | - QPDF_BOOL allow_accessibility, | |
| 843 | - QPDF_BOOL allow_extract, | |
| 844 | - qpdf_r3_print_e print, | |
| 845 | - qpdf_r3_modify_e modify, | |
| 846 | - QPDF_BOOL encrypt_metadata, | |
| 847 | - QPDF_BOOL use_aes) | |
| 848 | -{ | |
| 849 | -#ifdef _MSC_VER | |
| 850 | -# pragma warning(disable : 4996) | |
| 851 | -#endif | |
| 852 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 853 | -# pragma GCC diagnostic push | |
| 854 | -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
| 855 | -#endif | |
| 856 | - qpdf->qpdf_writer->setR4EncryptionParameters( | |
| 857 | - user_password, | |
| 858 | - owner_password, | |
| 859 | - allow_accessibility != QPDF_FALSE, | |
| 860 | - allow_extract != QPDF_FALSE, | |
| 861 | - print, | |
| 862 | - modify, | |
| 863 | - encrypt_metadata != QPDF_FALSE, | |
| 864 | - use_aes != QPDF_FALSE); | |
| 865 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 866 | -# pragma GCC diagnostic pop | |
| 867 | -#endif | |
| 868 | -} | |
| 869 | - | |
| 870 | -void | |
| 871 | -qpdf_set_r5_encryption_parameters( | |
| 872 | - qpdf_data qpdf, | |
| 873 | - char const* user_password, | |
| 874 | - char const* owner_password, | |
| 875 | - QPDF_BOOL allow_accessibility, | |
| 876 | - QPDF_BOOL allow_extract, | |
| 877 | - qpdf_r3_print_e print, | |
| 878 | - qpdf_r3_modify_e modify, | |
| 879 | - QPDF_BOOL encrypt_metadata) | |
| 880 | -{ | |
| 881 | -#ifdef _MSC_VER | |
| 882 | -# pragma warning(disable : 4996) | |
| 883 | -#endif | |
| 884 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 885 | -# pragma GCC diagnostic push | |
| 886 | -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
| 887 | -#endif | |
| 888 | - qpdf->qpdf_writer->setR5EncryptionParameters( | |
| 889 | - user_password, | |
| 890 | - owner_password, | |
| 891 | - allow_accessibility != QPDF_FALSE, | |
| 892 | - allow_extract != QPDF_FALSE, | |
| 893 | - print, | |
| 894 | - modify, | |
| 895 | - encrypt_metadata != QPDF_FALSE); | |
| 896 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 897 | -# pragma GCC diagnostic pop | |
| 898 | -#endif | |
| 899 | -} | |
| 900 | - | |
| 901 | -void | |
| 902 | -qpdf_set_r6_encryption_parameters( | |
| 903 | - qpdf_data qpdf, | |
| 904 | - char const* user_password, | |
| 905 | - char const* owner_password, | |
| 906 | - QPDF_BOOL allow_accessibility, | |
| 907 | - QPDF_BOOL allow_extract, | |
| 908 | - qpdf_r3_print_e print, | |
| 909 | - qpdf_r3_modify_e modify, | |
| 910 | - QPDF_BOOL encrypt_metadata) | |
| 911 | -{ | |
| 912 | -#ifdef _MSC_VER | |
| 913 | -# pragma warning(disable : 4996) | |
| 914 | -#endif | |
| 915 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 916 | -# pragma GCC diagnostic push | |
| 917 | -# pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
| 918 | -#endif | |
| 919 | - qpdf->qpdf_writer->setR6EncryptionParameters( | |
| 920 | - user_password, | |
| 921 | - owner_password, | |
| 922 | - allow_accessibility != QPDF_FALSE, | |
| 923 | - allow_extract != QPDF_FALSE, | |
| 924 | - print, | |
| 925 | - modify, | |
| 926 | - encrypt_metadata != QPDF_FALSE); | |
| 927 | -#if (defined(__GNUC__) || defined(__clang__)) | |
| 928 | -# pragma GCC diagnostic pop | |
| 929 | -#endif | |
| 930 | -} | |
| 931 | - | |
| 932 | -void | |
| 933 | 809 | qpdf_set_linearization(qpdf_data qpdf, QPDF_BOOL value) |
| 934 | 810 | { |
| 935 | 811 | QTC::TC("qpdf", "qpdf-c called qpdf_set_linearization"); | ... | ... |