|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.icesoft.pdf.pobjects.security.SecurityHandler
Defines common behaviors for Security Handlers.
| Field Summary | |
protected EncryptionDictionary |
encryptionDictionary
|
protected String |
handlerName
|
protected Permissions |
permissions
|
| Constructor Summary | |
SecurityHandler(EncryptionDictionary encryptionDictionary)
|
|
| Method Summary | |
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 InputStream |
getEncryptionInputStream(Reference objectReference,
byte[] encryptionKey,
InputStream input)
|
abstract byte[] |
getEncryptionKey()
Gets the encryption key used by the security handler for encrypting data. |
abstract 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(String password)
Determines whether the supplied password is authorized to view the PDF document. |
abstract boolean |
isOwnerAuthorized(String password)
Determines whether the supplied owner password is authorized to view the PDF document. |
abstract boolean |
isUserAuthorized(String password)
Determines whether the supplied user password is authorized to view the PDF document. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String handlerName
protected EncryptionDictionary encryptionDictionary
protected Permissions permissions
| Constructor Detail |
public SecurityHandler(EncryptionDictionary encryptionDictionary)
| Method Detail |
public abstract boolean isAuthorized(String password)
SecurityHandlerInterface
isAuthorized in interface SecurityHandlerInterfacepassword - password to authorize
public abstract boolean isUserAuthorized(String password)
SecurityHandlerInterface
isUserAuthorized in interface SecurityHandlerInterfacepassword - password to authorize
public abstract boolean isOwnerAuthorized(String password)
SecurityHandlerInterface
isOwnerAuthorized in interface SecurityHandlerInterfacepassword - password to authorize
public abstract byte[] encrypt(Reference objectReference,
byte[] encryptionKey,
byte[] data)
SecurityHandlerInterface
encrypt 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)
SecurityHandlerInterface
decrypt 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 InputStream getEncryptionInputStream(Reference objectReference,
byte[] encryptionKey,
InputStream input)
getEncryptionInputStream in interface SecurityHandlerInterfacepublic abstract byte[] getEncryptionKey()
SecurityHandlerInterface
getEncryptionKey in interface SecurityHandlerInterfacepublic abstract byte[] getDecryptionKey()
SecurityHandlerInterface
getDecryptionKey in interface SecurityHandlerInterfacepublic abstract String getHandlerName()
SecurityHandlerInterface
getHandlerName in interface SecurityHandlerInterfacepublic abstract Permissions getPermissions()
SecurityHandlerInterface
getPermissions in interface SecurityHandlerInterfacepublic abstract void init()
SecurityHandlerInterface
init in interface SecurityHandlerInterfacepublic abstract void dispose()
SecurityHandlerInterface
dispose in interface SecurityHandlerInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||