public abstract class SecurityHandler extends java.lang.Object implements SecurityHandlerInterface
| Modifier and Type | Field and Description |
|---|---|
protected EncryptionDictionary |
encryptionDictionary |
protected java.lang.String |
handlerName |
protected Permissions |
permissions |
| Constructor and Description |
|---|
SecurityHandler(EncryptionDictionary encryptionDictionary) |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
decrypt(Reference objectReference,
byte[] encryptionKey,
byte[] data)
Decrypt the PDF data bytestream or string.
|
abstract void |
dispose()
Dispose of the security handler.
|
abstract byte[] |
encrypt(Reference objectReference,
byte[] encryptionKey,
byte[] data)
Encrypt the PDF data bytestream or string.
|
abstract byte[] |
getDecryptionKey()
Gets the encryption key used by the security handler for decryption data.
|
abstract java.io.InputStream |
getEncryptionInputStream(Reference objectReference,
byte[] encryptionKey,
java.util.HashMap decodeparams,
java.io.InputStream input) |
abstract byte[] |
getEncryptionKey()
Gets the encryption key used by the security handler for encrypting data.
|
abstract java.lang.String |
getHandlerName()
Gets the name of the default security handler.
|
abstract Permissions |
getPermissions()
Gets the PDF permissions object associated with this document's
security handler.
|
abstract void |
init()
Initiate the security handler
|
abstract boolean |
isAuthorized(java.lang.String password)
Determines whether the supplied password is authorized to view the
PDF document.
|
abstract boolean |
isOwnerAuthorized(java.lang.String password)
Determines whether the supplied owner password is authorized to view the
PDF document.
|
abstract boolean |
isUserAuthorized(java.lang.String password)
Determines whether the supplied user password is authorized to view the
PDF document.
|
protected java.lang.String handlerName
protected EncryptionDictionary encryptionDictionary
protected Permissions permissions
public SecurityHandler(EncryptionDictionary encryptionDictionary)
public abstract boolean isAuthorized(java.lang.String password)
SecurityHandlerInterfaceisAuthorized in interface SecurityHandlerInterfacepassword - password to authorizepublic abstract boolean isUserAuthorized(java.lang.String password)
SecurityHandlerInterfaceisUserAuthorized in interface SecurityHandlerInterfacepassword - password to authorizepublic abstract boolean isOwnerAuthorized(java.lang.String password)
SecurityHandlerInterfaceisOwnerAuthorized in interface SecurityHandlerInterfacepassword - password to authorizepublic abstract byte[] encrypt(Reference objectReference, byte[] encryptionKey, byte[] data)
SecurityHandlerInterfaceencrypt in interface SecurityHandlerInterfaceobjectReference - reference to PDF object being encrypted; this object
contains the PDF object number and revision.encryptionKey - encryption key used by encryption algorithm.data - byte data to be encrypted; either represents an object stream
or string value.public abstract byte[] decrypt(Reference objectReference, byte[] encryptionKey, byte[] data)
SecurityHandlerInterfacedecrypt in interface SecurityHandlerInterfaceobjectReference - reference to PDF object being encrypted; this object
contains the PDF object number and revision.encryptionKey - encryption key used by decryption algorithm.data - byte data to be decrypted; either represents an object stream
or string value.public abstract java.io.InputStream getEncryptionInputStream(Reference objectReference, byte[] encryptionKey, java.util.HashMap decodeparams, java.io.InputStream input)
getEncryptionInputStream in interface SecurityHandlerInterfacepublic abstract byte[] getEncryptionKey()
SecurityHandlerInterfacegetEncryptionKey in interface SecurityHandlerInterfacepublic abstract byte[] getDecryptionKey()
SecurityHandlerInterfacegetDecryptionKey in interface SecurityHandlerInterfacepublic abstract java.lang.String getHandlerName()
SecurityHandlerInterfacegetHandlerName in interface SecurityHandlerInterfacepublic abstract Permissions getPermissions()
SecurityHandlerInterfacegetPermissions in interface SecurityHandlerInterfacepublic abstract void init()
SecurityHandlerInterfaceinit in interface SecurityHandlerInterfacepublic abstract void dispose()
SecurityHandlerInterfacedispose in interface SecurityHandlerInterface