23#ifndef MUPDF_PDF_CRYPT_H
24#define MUPDF_PDF_CRYPT_H
104void pdf_encrypt_data(
fz_context *ctx,
pdf_crypt *crypt,
int num,
int gen,
void (*fmt_str_out)(
fz_context *,
void *,
const unsigned char *,
size_t),
void *arg,
const unsigned char *s,
size_t n);
struct pdf_annot pdf_annot
Definition annot.h:32
struct pdf_obj pdf_obj
Definition object.h:44
struct pdf_crypt pdf_crypt
Definition object.h:29
fz_stream * pdf_open_crypt(fz_context *ctx, fz_stream *chain, pdf_crypt *crypt, int num, int gen)
void pdf_encrypt_data(fz_context *ctx, pdf_crypt *crypt, int num, int gen, void(*fmt_str_out)(fz_context *, void *, const unsigned char *, size_t), void *arg, const unsigned char *s, size_t n)
int pdf_crypt_encrypt_metadata(fz_context *ctx, pdf_crypt *crypt)
int pdf_incremental_change_since_signing_widget(fz_context *ctx, pdf_annot *widget)
int pdf_crypt_revision(fz_context *ctx, pdf_crypt *crypt)
void pdf_print_crypt(fz_context *ctx, fz_output *out, pdf_crypt *crypt)
fz_stream * pdf_open_crypt_with_filter(fz_context *ctx, fz_stream *chain, pdf_crypt *crypt, pdf_obj *name, int num, int gen)
const char * pdf_crypt_string_method(fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_user_password(fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_permissions_encryption(fz_context *ctx, pdf_crypt *crypt)
int pdf_crypt_length(fz_context *ctx, pdf_crypt *crypt)
void pdf_drop_crypt(fz_context *ctx, pdf_crypt *crypt)
size_t pdf_signature_contents(fz_context *ctx, pdf_document *doc, pdf_obj *signature, char **contents)
int pdf_signature_byte_range(fz_context *ctx, pdf_document *doc, pdf_obj *signature, fz_range *byte_range)
void pdf_write_digest(fz_context *ctx, fz_output *out, pdf_obj *byte_range, pdf_obj *field, size_t digest_offset, size_t digest_length, pdf_pkcs7_signer *signer)
const char * pdf_crypt_method(fz_context *ctx, pdf_crypt *crypt)
pdf_crypt * pdf_new_encrypt(fz_context *ctx, const char *opwd_utf8, const char *upwd_utf8, pdf_obj *id, int permissions, int algorithm)
pdf_crypt * pdf_new_crypt(fz_context *ctx, pdf_obj *enc, pdf_obj *id)
@ PDF_PERM_ASSEMBLE
Definition crypt.h:82
@ PDF_PERM_ANNOTATE
Definition crypt.h:79
@ PDF_PERM_MODIFY
Definition crypt.h:77
@ PDF_PERM_FORM
Definition crypt.h:80
@ PDF_PERM_COPY
Definition crypt.h:78
@ PDF_PERM_ACCESSIBILITY
Definition crypt.h:81
@ PDF_PERM_PRINT
Definition crypt.h:76
@ PDF_PERM_PRINT_HQ
Definition crypt.h:83
const char * pdf_crypt_stream_method(fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_user_encryption(fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_owner_password(fz_context *ctx, pdf_crypt *crypt)
int pdf_document_permissions(fz_context *ctx, pdf_document *doc)
int pdf_crypt_permissions(fz_context *ctx, pdf_crypt *crypt)
size_t pdf_encrypted_len(fz_context *ctx, pdf_crypt *crypt, int num, int gen, size_t len)
int pdf_crypt_version(fz_context *ctx, pdf_crypt *crypt)
int pdf_signature_incremental_change_since_signing(fz_context *ctx, pdf_document *doc, pdf_obj *signature)
unsigned char * pdf_crypt_owner_encryption(fz_context *ctx, pdf_crypt *crypt)
fz_stream * pdf_signature_hash_bytes(fz_context *ctx, pdf_document *doc, pdf_obj *signature)
void pdf_crypt_obj(fz_context *ctx, pdf_crypt *crypt, pdf_obj *obj, int num, int gen)
@ PDF_ENCRYPT_UNKNOWN
Definition crypt.h:37
@ PDF_ENCRYPT_NONE
Definition crypt.h:32
@ PDF_ENCRYPT_RC4_40
Definition crypt.h:33
@ PDF_ENCRYPT_RC4_128
Definition crypt.h:34
@ PDF_ENCRYPT_AES_256
Definition crypt.h:36
@ PDF_ENCRYPT_AES_128
Definition crypt.h:35
@ PDF_ENCRYPT_KEEP
Definition crypt.h:31
unsigned char * pdf_crypt_key(fz_context *ctx, pdf_crypt *crypt)
Definition document.h:463