public void setRestrictiveAes256EncryptionOptions(string userAndOwnerPassword) { QPDF_R3_PRINT_E printOption = QPDF_R3_PRINT_E.qpdf_r3p_none; QPDF_R3_MODIFY_E modifyOption = QPDF_R3_MODIFY_E.qpdf_r3m_none; bool extractAllowed = false; bool encryptMetadata = false; setAes256EncryptionOptions(userAndOwnerPassword, userAndOwnerPassword, printOption, modifyOption, extractAllowed, encryptMetadata); }
public void setAes256EncryptionOptions(string userPassword, string ownerPassword, QPDF_R3_PRINT_E printOption, QPDF_R3_MODIFY_E modifyOption, bool extractAllowed, bool encryptMetadata) { initCheck(); writeInitCheck(); int po = (int)printOption; int mo = (int)modifyOption; int ea = extractAllowed ? 1 : 0; int em = encryptMetadata ? 1 : 0; qpdf_set_r6_encryption_parameters(ctx, userPassword, ownerPassword, 1, ea, po, mo, em); }