LibreOffice Module sdext (master) 1
Classes | Namespaces | Macros | Functions | Variables
pdfentries.cxx File Reference
#include <pdfparse.hxx>
#include <comphelper/hash.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/digest.h>
#include <rtl/cipher.h>
#include <sal/log.hxx>
#include <zlib.h>
#include <math.h>
#include <map>
#include <string.h>
Include dependency graph for pdfentries.cxx:

Go to the source code of this file.

Classes

struct  pdfparse::EmitImplData
 
struct  pdfparse::PDFFileImplData
 

Namespaces

namespace  pdfparse
 

Macros

#define ENCRYPTION_KEY_LEN   16
 
#define ENCRYPTION_BUF_LEN   32
 

Functions

static void unzipToBuffer (char *pBegin, unsigned int nLen, sal_uInt8 **pOutBuf, sal_uInt32 *pOutLen)
 
static void pad_or_truncate_to_32 (const OString &rStr, char *pBuffer)
 
static sal_uInt32 password_to_key (const OString &rPwd, sal_uInt8 *pOutKey, PDFFileImplData const *pData, bool bComputeO)
 
static bool check_user_password (const OString &rPwd, PDFFileImplData *pData)
 

Variables

const sal_uInt8 nPadString [32]
 

Macro Definition Documentation

◆ ENCRYPTION_BUF_LEN

#define ENCRYPTION_BUF_LEN   32

Definition at line 1010 of file pdfentries.cxx.

◆ ENCRYPTION_KEY_LEN

#define ENCRYPTION_KEY_LEN   16

Definition at line 1009 of file pdfentries.cxx.

Function Documentation

◆ check_user_password()

static bool check_user_password ( const OString &  rPwd,
PDFFileImplData pData 
)
static

◆ pad_or_truncate_to_32()

static void pad_or_truncate_to_32 ( const OString &  rStr,
char *  pBuffer 
)
static

Definition at line 1101 of file pdfentries.cxx.

References i, and nPadString.

Referenced by password_to_key().

◆ password_to_key()

static sal_uInt32 password_to_key ( const OString &  rPwd,
sal_uInt8 pOutKey,
PDFFileImplData const *  pData,
bool  bComputeO 
)
static

◆ unzipToBuffer()

static void unzipToBuffer ( char *  pBegin,
unsigned int  nLen,
sal_uInt8 **  pOutBuf,
sal_uInt32 *  pOutLen 
)
static

Definition at line 724 of file pdfentries.cxx.

References err, and p.

Referenced by pdfparse::PDFObject::emit(), and pdfparse::PDFObject::writeStream().

Variable Documentation

◆ nPadString

const sal_uInt8 nPadString[32]
Initial value:
=
{
0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41, 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80, 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A
}

Definition at line 1095 of file pdfentries.cxx.

Referenced by check_user_password(), and pad_or_truncate_to_32().