public class StandardSecurityHandler extends Object
| Constructor and Description |
|---|
StandardSecurityHandler(PDEncryption pdEncryption,
COSObject id)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
authenticateEmptyPassword()
Checks if empty string is a user password to this PDF document and sets
encryption key if password is successfully checked.
|
void |
decryptStream(COSStream stream,
COSKey key)
Applies decryption filter to the stream so it can be read as unencrypted.
|
void |
decryptString(COSString string,
COSKey stringKey)
Decrypts string and writes result into string.
|
byte[] |
getEncryptionKey() |
PDEncryption |
getPdEncryption() |
boolean |
isEmptyStringPassword() |
public StandardSecurityHandler(PDEncryption pdEncryption, COSObject id)
pdEncryption - is encryption object of this PDF document.id - is ID object from document trailer.public Boolean authenticateEmptyPassword()
public byte[] getEncryptionKey()
public boolean isEmptyStringPassword()
public void decryptString(COSString string, COSKey stringKey) throws IOException, GeneralSecurityException
string - is COSString to decrypt.stringKey - is COSKey of object that contains this COSString.IOExceptionGeneralSecurityExceptionpublic void decryptStream(COSStream stream, COSKey key) throws IOException, GeneralSecurityException
stream - is COSStream with encrypted data.key - is COSKey of this stream.IOExceptionGeneralSecurityExceptionpublic PDEncryption getPdEncryption()
Copyright © 2015–2017 The veraPDF Consortium. All rights reserved.