public class SystemSecurityHandlerV4 extends SystemSecurityHandler
ISystemSecurityHandler implementing /V 4 of the PDF spec.
The crypt handlers are created lazy and never changed - it is unwise to change any encryption parameters afterwards!
| Modifier and Type | Field and Description |
|---|---|
static COSName |
CN_AESV2 |
static COSName |
CN_CryptFilter |
static COSName |
CN_None |
static COSName |
CN_V2 |
static COSName |
DK_CFM |
static COSName |
DK_NAME |
static COSName |
DK_TYPE |
DEFAULT_LENGTH| Modifier and Type | Method and Description |
|---|---|
void |
cosAddCryptFilter(COSName name,
COSDictionary cryptFilterDict) |
COSDictionary |
cosGetCryptFilters() |
void |
cosRemoveCryptFilter(COSName name) |
byte[] |
decryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
decryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
decryptString(COSObjectKey key,
byte[] bytes) |
byte[] |
encryptFile(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
encryptStream(COSObjectKey key,
COSDictionary dict,
byte[] bytes) |
byte[] |
encryptString(COSObjectKey key,
byte[] bytes) |
ICryptHandler |
getCryptHandler(COSName name) |
int |
getLength()
The length of the encryption key in bits.
|
int |
getVersion() |
void |
setEncryptionFilterStream(COSName name) |
void |
setEncryptionFilterString(COSName name) |
void |
setEncryptionMethodAES(COSName filterName) |
void |
setEncryptionMethodArcFour(COSName filterName) |
void |
setEncryptionMethodNone(COSName filterName) |
void |
setEncryptMetadata(boolean value) |
attach, authenticate, cosGetEncryption, createFromSt, createNewV1, createNewV2, createNewV4, detach, getContextObject, getEncryption, getSecurityHandler, initialize, popContextObject, pushContextObject, setLength, setSecurityHandler, stGetDoc, updateTrailerpublic static final COSName CN_AESV2
public static final COSName CN_CryptFilter
public static final COSName CN_None
public static final COSName CN_V2
public static final COSName DK_CFM
public static final COSName DK_NAME
public static final COSName DK_TYPE
public void cosAddCryptFilter(COSName name, COSDictionary cryptFilterDict)
public COSDictionary cosGetCryptFilters()
public void cosRemoveCryptFilter(COSName name)
public byte[] decryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionpublic byte[] decryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionpublic byte[] decryptString(COSObjectKey key, byte[] bytes) throws COSSecurityException
COSSecurityExceptionpublic byte[] encryptFile(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionpublic byte[] encryptStream(COSObjectKey key, COSDictionary dict, byte[] bytes) throws COSSecurityException
COSSecurityExceptionpublic byte[] encryptString(COSObjectKey key, byte[] bytes) throws COSSecurityException
COSSecurityExceptionpublic ICryptHandler getCryptHandler(COSName name) throws COSSecurityException
COSSecurityExceptionpublic int getLength()
ISystemSecurityHandlergetLength in interface ISystemSecurityHandlergetLength in class SystemSecurityHandlerpublic int getVersion()
getVersion in class SystemSecurityHandlerpublic void setEncryptionFilterStream(COSName name)
public void setEncryptionFilterString(COSName name)
public void setEncryptionMethodAES(COSName filterName)
public void setEncryptionMethodArcFour(COSName filterName)
public void setEncryptionMethodNone(COSName filterName)
public void setEncryptMetadata(boolean value)
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.