HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.PdfEncryption Class Reference

Public Member Functions

 PdfEncryption ()
 
 PdfEncryption (PdfEncryption enc)
 
void SetCryptoMode (int mode, int kl)
 
int GetCryptoMode ()
 
bool IsMetadataEncrypted ()
 
bool IsEmbeddedFilesOnly ()
 
void SetupAllKeys (byte[] userPassword, byte[] ownerPassword, int permissions)
 
void SetupByUserPassword (byte[] documentID, byte[] userPassword, byte[] ownerKey, int permissions)
 
void SetupByOwnerPassword (byte[] documentID, byte[] ownerPassword, byte[] userKey, byte[] ownerKey, int permissions)
 
void SetupByEncryptionKey (byte[] key, int keylength)
 
void SetHashKey (int number, int generation)
 
PdfDictionary GetEncryptionDictionary ()
 
OutputStreamEncryption GetEncryptionStream (Stream os)
 
int CalculateStreamSize (int n)
 
byte[] EncryptByteArray (byte[] b)
 
StandardDecryption GetDecryptor ()
 
byte[] DecryptByteArray (byte[] b)
 
void AddRecipient (X509Certificate cert, int permission)
 
byte[] ComputeUserPassword (byte[] ownerPassword)
 

Static Public Member Functions

static byte[] CreateDocumentId ()
 
static PdfObject CreateInfoId (byte[] id)
 

Static Public Attributes

const int STANDARD_ENCRYPTION_40 = 2
 
const int STANDARD_ENCRYPTION_128 = 3
 
const int AES_128 = 4
 

Protected Attributes

PdfPublicKeySecurityHandler publicKeyHandler = null
 

Properties

PdfObject FileID [get]
 

Detailed Description

Constructor & Destructor Documentation

◆ PdfEncryption() [1/2]

iTextSharp.text.pdf.PdfEncryption.PdfEncryption ( )

◆ PdfEncryption() [2/2]

iTextSharp.text.pdf.PdfEncryption.PdfEncryption ( PdfEncryption  enc)

Member Function Documentation

◆ AddRecipient()

void iTextSharp.text.pdf.PdfEncryption.AddRecipient ( X509Certificate  cert,
int  permission 
)

◆ CalculateStreamSize()

int iTextSharp.text.pdf.PdfEncryption.CalculateStreamSize ( int  n)

◆ ComputeUserPassword()

byte [] iTextSharp.text.pdf.PdfEncryption.ComputeUserPassword ( byte[]  ownerPassword)

◆ CreateDocumentId()

static byte [] iTextSharp.text.pdf.PdfEncryption.CreateDocumentId ( )
static

◆ CreateInfoId()

static PdfObject iTextSharp.text.pdf.PdfEncryption.CreateInfoId ( byte[]  id)
static

◆ DecryptByteArray()

byte [] iTextSharp.text.pdf.PdfEncryption.DecryptByteArray ( byte[]  b)

◆ EncryptByteArray()

byte [] iTextSharp.text.pdf.PdfEncryption.EncryptByteArray ( byte[]  b)

◆ GetCryptoMode()

int iTextSharp.text.pdf.PdfEncryption.GetCryptoMode ( )

◆ GetDecryptor()

StandardDecryption iTextSharp.text.pdf.PdfEncryption.GetDecryptor ( )

◆ GetEncryptionDictionary()

PdfDictionary iTextSharp.text.pdf.PdfEncryption.GetEncryptionDictionary ( )

◆ GetEncryptionStream()

OutputStreamEncryption iTextSharp.text.pdf.PdfEncryption.GetEncryptionStream ( Stream  os)

◆ IsEmbeddedFilesOnly()

bool iTextSharp.text.pdf.PdfEncryption.IsEmbeddedFilesOnly ( )

Indicates if only the embedded files have to be encrypted.

Returns
if true only the embedded files will be encrypted
Since
2.1.3

◆ IsMetadataEncrypted()

bool iTextSharp.text.pdf.PdfEncryption.IsMetadataEncrypted ( )

◆ SetCryptoMode()

void iTextSharp.text.pdf.PdfEncryption.SetCryptoMode ( int  mode,
int  kl 
)

◆ SetHashKey()

void iTextSharp.text.pdf.PdfEncryption.SetHashKey ( int  number,
int  generation 
)

◆ SetupAllKeys()

void iTextSharp.text.pdf.PdfEncryption.SetupAllKeys ( byte[]  userPassword,
byte[]  ownerPassword,
int  permissions 
)

◆ SetupByEncryptionKey()

void iTextSharp.text.pdf.PdfEncryption.SetupByEncryptionKey ( byte[]  key,
int  keylength 
)

◆ SetupByOwnerPassword()

void iTextSharp.text.pdf.PdfEncryption.SetupByOwnerPassword ( byte[]  documentID,
byte[]  ownerPassword,
byte[]  userKey,
byte[]  ownerKey,
int  permissions 
)

◆ SetupByUserPassword()

void iTextSharp.text.pdf.PdfEncryption.SetupByUserPassword ( byte[]  documentID,
byte[]  userPassword,
byte[]  ownerKey,
int  permissions 
)

Member Data Documentation

◆ AES_128

const int iTextSharp.text.pdf.PdfEncryption.AES_128 = 4
static

◆ publicKeyHandler

PdfPublicKeySecurityHandler iTextSharp.text.pdf.PdfEncryption.publicKeyHandler = null
protected

The public key security handler for certificate encryption

◆ STANDARD_ENCRYPTION_128

const int iTextSharp.text.pdf.PdfEncryption.STANDARD_ENCRYPTION_128 = 3
static

◆ STANDARD_ENCRYPTION_40

const int iTextSharp.text.pdf.PdfEncryption.STANDARD_ENCRYPTION_40 = 2
static

Property Documentation

◆ FileID

PdfObject iTextSharp.text.pdf.PdfEncryption.FileID
get

The documentation for this class was generated from the following file: