Haru Free PDF Library
hpdf_encrypt.h File Reference
#include "hpdf_mmgr.h"
Include dependency graph for hpdf_encrypt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HPDF_MD5Context
 
struct  _HPDF_ARC4_Ctx_Rec
 
struct  _HPDF_Encrypt_Rec
 

Macros

#define HPDF_ID_LEN   16
 
#define HPDF_PASSWD_LEN   32
 
#define HPDF_ENCRYPT_KEY_MAX   16
 
#define HPDF_MD5_KEY_LEN   16
 
#define HPDF_PERMISSION_PAD   0xFFFFFFC0
 
#define HPDF_ARC4_BUF_SIZE   256
 

Typedefs

typedef struct HPDF_MD5Context HPDF_MD5_CTX
 
typedef struct _HPDF_ARC4_Ctx_Rec HPDF_ARC4_Ctx_Rec
 
typedef struct _HPDF_Encrypt_RecHPDF_Encrypt
 
typedef struct _HPDF_Encrypt_Rec HPDF_Encrypt_Rec
 

Functions

void HPDF_MD5Init (struct HPDF_MD5Context *ctx)
 
void HPDF_MD5Update (struct HPDF_MD5Context *ctx, const HPDF_BYTE *buf, HPDF_UINT32 len)
 
void HPDF_MD5Final (HPDF_BYTE digest[16], struct HPDF_MD5Context *ctx)
 
void HPDF_PadOrTrancatePasswd (const char *pwd, HPDF_BYTE *new_pwd)
 
void HPDF_Encrypt_Init (HPDF_Encrypt attr)
 
void HPDF_Encrypt_CreateUserKey (HPDF_Encrypt attr)
 
void HPDF_Encrypt_CreateOwnerKey (HPDF_Encrypt attr)
 
void HPDF_Encrypt_CreateEncryptionKey (HPDF_Encrypt attr)
 
void HPDF_Encrypt_InitKey (HPDF_Encrypt attr, HPDF_UINT32 object_id, HPDF_UINT16 gen_no)
 
void HPDF_Encrypt_Reset (HPDF_Encrypt attr)
 
void HPDF_Encrypt_CryptBuf (HPDF_Encrypt attr, const HPDF_BYTE *src, HPDF_BYTE *dst, HPDF_UINT len)
 

Macro Definition Documentation

◆ HPDF_ARC4_BUF_SIZE

#define HPDF_ARC4_BUF_SIZE   256

◆ HPDF_ENCRYPT_KEY_MAX

#define HPDF_ENCRYPT_KEY_MAX   16

◆ HPDF_ID_LEN

#define HPDF_ID_LEN   16

◆ HPDF_MD5_KEY_LEN

#define HPDF_MD5_KEY_LEN   16

◆ HPDF_PASSWD_LEN

#define HPDF_PASSWD_LEN   32

◆ HPDF_PERMISSION_PAD

#define HPDF_PERMISSION_PAD   0xFFFFFFC0

Typedef Documentation

◆ HPDF_ARC4_Ctx_Rec

◆ HPDF_Encrypt

◆ HPDF_Encrypt_Rec

◆ HPDF_MD5_CTX

typedef struct HPDF_MD5Context HPDF_MD5_CTX

Function Documentation

◆ HPDF_Encrypt_CreateEncryptionKey()

void HPDF_Encrypt_CreateEncryptionKey ( HPDF_Encrypt  attr)

◆ HPDF_Encrypt_CreateOwnerKey()

void HPDF_Encrypt_CreateOwnerKey ( HPDF_Encrypt  attr)

◆ HPDF_Encrypt_CreateUserKey()

void HPDF_Encrypt_CreateUserKey ( HPDF_Encrypt  attr)

◆ HPDF_Encrypt_CryptBuf()

void HPDF_Encrypt_CryptBuf ( HPDF_Encrypt  attr,
const HPDF_BYTE src,
HPDF_BYTE dst,
HPDF_UINT  len 
)

◆ HPDF_Encrypt_Init()

void HPDF_Encrypt_Init ( HPDF_Encrypt  attr)

◆ HPDF_Encrypt_InitKey()

void HPDF_Encrypt_InitKey ( HPDF_Encrypt  attr,
HPDF_UINT32  object_id,
HPDF_UINT16  gen_no 
)

◆ HPDF_Encrypt_Reset()

void HPDF_Encrypt_Reset ( HPDF_Encrypt  attr)

◆ HPDF_MD5Final()

void HPDF_MD5Final ( HPDF_BYTE  digest[16],
struct HPDF_MD5Context ctx 
)

◆ HPDF_MD5Init()

void HPDF_MD5Init ( struct HPDF_MD5Context ctx)

◆ HPDF_MD5Update()

void HPDF_MD5Update ( struct HPDF_MD5Context ctx,
const HPDF_BYTE buf,
HPDF_UINT32  len 
)

◆ HPDF_PadOrTrancatePasswd()

void HPDF_PadOrTrancatePasswd ( const char *  pwd,
HPDF_BYTE new_pwd 
)