mupdf
Loading...
Searching...
No Matches
crypt.h File Reference
Include dependency graph for crypt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  {
  PDF_ENCRYPT_KEEP , PDF_ENCRYPT_NONE , PDF_ENCRYPT_RC4_40 , PDF_ENCRYPT_RC4_128 ,
  PDF_ENCRYPT_AES_128 , PDF_ENCRYPT_AES_256 , PDF_ENCRYPT_UNKNOWN
}
enum  {
  PDF_PERM_PRINT = 1 << 2 , PDF_PERM_MODIFY = 1 << 3 , PDF_PERM_COPY = 1 << 4 , PDF_PERM_ANNOTATE = 1 << 5 ,
  PDF_PERM_FORM = 1 << 8 , PDF_PERM_ACCESSIBILITY = 1 << 9 , PDF_PERM_ASSEMBLE = 1 << 10 , PDF_PERM_PRINT_HQ = 1 << 11
}

Functions

pdf_cryptpdf_new_crypt (fz_context *ctx, pdf_obj *enc, pdf_obj *id)
pdf_cryptpdf_new_encrypt (fz_context *ctx, const char *opwd_utf8, const char *upwd_utf8, pdf_obj *id, int permissions, int algorithm)
void pdf_drop_crypt (fz_context *ctx, pdf_crypt *crypt)
void pdf_crypt_obj (fz_context *ctx, pdf_crypt *crypt, pdf_obj *obj, int num, int gen)
fz_streampdf_open_crypt (fz_context *ctx, fz_stream *chain, pdf_crypt *crypt, int num, int gen)
fz_streampdf_open_crypt_with_filter (fz_context *ctx, fz_stream *chain, pdf_crypt *crypt, pdf_obj *name, int num, int gen)
int pdf_crypt_version (fz_context *ctx, pdf_crypt *crypt)
int pdf_crypt_revision (fz_context *ctx, pdf_crypt *crypt)
const char * pdf_crypt_method (fz_context *ctx, pdf_crypt *crypt)
const char * pdf_crypt_string_method (fz_context *ctx, pdf_crypt *crypt)
const char * pdf_crypt_stream_method (fz_context *ctx, pdf_crypt *crypt)
int pdf_crypt_length (fz_context *ctx, pdf_crypt *crypt)
int pdf_crypt_permissions (fz_context *ctx, pdf_crypt *crypt)
int pdf_crypt_encrypt_metadata (fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_owner_password (fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_user_password (fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_owner_encryption (fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_user_encryption (fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_permissions_encryption (fz_context *ctx, pdf_crypt *crypt)
unsigned char * pdf_crypt_key (fz_context *ctx, pdf_crypt *crypt)
void pdf_print_crypt (fz_context *ctx, fz_output *out, pdf_crypt *crypt)
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)
int pdf_document_permissions (fz_context *ctx, pdf_document *doc)
int pdf_signature_byte_range (fz_context *ctx, pdf_document *doc, pdf_obj *signature, fz_range *byte_range)
fz_streampdf_signature_hash_bytes (fz_context *ctx, pdf_document *doc, pdf_obj *signature)
int pdf_signature_incremental_change_since_signing (fz_context *ctx, pdf_document *doc, pdf_obj *signature)
int pdf_incremental_change_since_signing_widget (fz_context *ctx, pdf_annot *widget)
size_t pdf_signature_contents (fz_context *ctx, pdf_document *doc, pdf_obj *signature, char **contents)
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)
size_t pdf_encrypted_len (fz_context *ctx, pdf_crypt *crypt, int num, int gen, size_t len)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PDF_ENCRYPT_KEEP 
PDF_ENCRYPT_NONE 
PDF_ENCRYPT_RC4_40 
PDF_ENCRYPT_RC4_128 
PDF_ENCRYPT_AES_128 
PDF_ENCRYPT_AES_256 
PDF_ENCRYPT_UNKNOWN 

◆ anonymous enum

anonymous enum
Enumerator
PDF_PERM_PRINT 
PDF_PERM_MODIFY 
PDF_PERM_COPY 
PDF_PERM_ANNOTATE 
PDF_PERM_FORM 
PDF_PERM_ACCESSIBILITY 
PDF_PERM_ASSEMBLE 
PDF_PERM_PRINT_HQ 

Function Documentation

◆ pdf_crypt_encrypt_metadata()

int pdf_crypt_encrypt_metadata ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_key()

unsigned char * pdf_crypt_key ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_length()

int pdf_crypt_length ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_method()

const char * pdf_crypt_method ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_obj()

void pdf_crypt_obj ( fz_context * ctx,
pdf_crypt * crypt,
pdf_obj * obj,
int num,
int gen )

◆ pdf_crypt_owner_encryption()

unsigned char * pdf_crypt_owner_encryption ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_owner_password()

unsigned char * pdf_crypt_owner_password ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_permissions()

int pdf_crypt_permissions ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_permissions_encryption()

unsigned char * pdf_crypt_permissions_encryption ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_revision()

int pdf_crypt_revision ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_stream_method()

const char * pdf_crypt_stream_method ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_string_method()

const char * pdf_crypt_string_method ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_user_encryption()

unsigned char * pdf_crypt_user_encryption ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_user_password()

unsigned char * pdf_crypt_user_password ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_crypt_version()

int pdf_crypt_version ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_document_permissions()

int pdf_document_permissions ( fz_context * ctx,
pdf_document * doc )

◆ pdf_drop_crypt()

void pdf_drop_crypt ( fz_context * ctx,
pdf_crypt * crypt )

◆ pdf_encrypt_data()

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 )

◆ pdf_encrypted_len()

size_t pdf_encrypted_len ( fz_context * ctx,
pdf_crypt * crypt,
int num,
int gen,
size_t len )

◆ pdf_incremental_change_since_signing_widget()

int pdf_incremental_change_since_signing_widget ( fz_context * ctx,
pdf_annot * widget )

◆ pdf_new_crypt()

pdf_crypt * pdf_new_crypt ( fz_context * ctx,
pdf_obj * enc,
pdf_obj * id )

◆ pdf_new_encrypt()

pdf_crypt * pdf_new_encrypt ( fz_context * ctx,
const char * opwd_utf8,
const char * upwd_utf8,
pdf_obj * id,
int permissions,
int algorithm )

◆ pdf_open_crypt()

fz_stream * pdf_open_crypt ( fz_context * ctx,
fz_stream * chain,
pdf_crypt * crypt,
int num,
int gen )

◆ pdf_open_crypt_with_filter()

fz_stream * pdf_open_crypt_with_filter ( fz_context * ctx,
fz_stream * chain,
pdf_crypt * crypt,
pdf_obj * name,
int num,
int gen )

◆ pdf_print_crypt()

void pdf_print_crypt ( fz_context * ctx,
fz_output * out,
pdf_crypt * crypt )

◆ pdf_signature_byte_range()

int pdf_signature_byte_range ( fz_context * ctx,
pdf_document * doc,
pdf_obj * signature,
fz_range * byte_range )

◆ pdf_signature_contents()

size_t pdf_signature_contents ( fz_context * ctx,
pdf_document * doc,
pdf_obj * signature,
char ** contents )

◆ pdf_signature_hash_bytes()

fz_stream * pdf_signature_hash_bytes ( fz_context * ctx,
pdf_document * doc,
pdf_obj * signature )

◆ pdf_signature_incremental_change_since_signing()

int pdf_signature_incremental_change_since_signing ( fz_context * ctx,
pdf_document * doc,
pdf_obj * signature )

◆ pdf_write_digest()

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 )