PDFEncryptionDict

PDFEncryptionDict

Overview

PDFEncryptionDict is a class in Aspose.PDF FOSS for Java.

Wraps the /Encrypt dictionary from the PDF trailer (ISO 32000-1:2008, §7.6.1, Tables 20-21).

This class provides 19 methods for working with PDFEncryptionDict objects in Java programs. Available methods include: PDFEncryptionDict, build, getCF, getCipherType, getEncryptMetadata, getFilter, getKeyLength, getLength, getO, getOE, getP, getPdfDictionary, and 7 additional methods. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: cF, cipherType, encryptMetadata, filter, keyLength, length, and 11 more.

Properties

NameTypeAccessDescription
filterStringReadFilter name — must be “Standard” for standard handler.
vintReadV: algorithm version (0-5).
rintReadR: security handler revision (2-6).
lengthintReadKey length in bits (40-256).
keyLengthintReadKey length in bytes.
obyte[]ReadO: owner password hash.
ubyte[]ReadU: user password hash.
oEbyte[]ReadOE: owner encryption key (R=6, 32 bytes).
uEbyte[]ReadUE: user encryption key (R=6, 32 bytes).
permsbyte[]ReadPerms: encrypted permissions (R=6, 16 bytes).
pintReadP: permission flags as a signed 32-bit integer.
encryptMetadatabooleanReadEncryptMetadata: default true.
stmFStringReadStmF: crypt filter for streams (V=4+).
strFStringReadStrF: crypt filter for strings (V=4+).
cFPdfDictionaryReadCF: crypt filter dictionary (V=4+).
cipherTypeCipherTypeReadDetermines the cipher type based on V and crypt filters.
pdfDictionaryPdfDictionaryReadReturns the underlying dictionary.

Methods

SignatureDescription
PDFEncryptionDict(dict: PdfDictionary)Creates an encryption dictionary wrapper.
getFilter()StringFilter name — must be “Standard” for standard handler.
getV()intV: algorithm version (0-5).
getR()intR: security handler revision (2-6).
getLength()intKey length in bits (40-256).
getKeyLength()intKey length in bytes.
getO()byte[]O: owner password hash.
getU()byte[]U: user password hash.
getOE()byte[]OE: owner encryption key (R=6, 32 bytes).
getUE()byte[]UE: user encryption key (R=6, 32 bytes).
getPerms()byte[]Perms: encrypted permissions (R=6, 16 bytes).
getP()intP: permission flags as a signed 32-bit integer.
getEncryptMetadata()booleanEncryptMetadata: default true.
getStmF()StringStmF: crypt filter for streams (V=4+).
getStrF()StringStrF: crypt filter for strings (V=4+).
getCF()PdfDictionaryCF: crypt filter dictionary (V=4+).
getCipherType()CipherTypeDetermines the cipher type based on V and crypt filters.
build(algorithm: CryptoAlgorithm, permissions: int, O: byte[], U: byte[], OE: byte[], UE: byte[], Perms: byte[])PDFEncryptionDictBuilds a new /Encrypt dictionary for the given algorithm and parameters.
getPdfDictionary()PdfDictionaryReturns the underlying dictionary.

See Also

 English