|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.security.SecurityHandler
public abstract class SecurityHandler
Defines common behaviors for Security Handlers.
| Field Summary | |
|---|---|
protected EncryptionDictionary |
encryptionDictionary
|
protected java.lang.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 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String handlerName
protected EncryptionDictionary encryptionDictionary
protected Permissions permissions
| Constructor Detail |
|---|
public SecurityHandler(EncryptionDictionary encryptionDictionary)
| Method Detail |
|---|
public abstract boolean isAuthorized(java.lang.String password)
SecurityHandlerInterface
isAuthorized in interface SecurityHandlerInterfacepassword - password to authorize
public abstract boolean isUserAuthorized(java.lang.String password)
SecurityHandlerInterface
isUserAuthorized in interface SecurityHandlerInterfacepassword - password to authorize
public abstract boolean isOwnerAuthorized(java.lang.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 java.io.InputStream getEncryptionInputStream(Reference objectReference,
byte[] encryptionKey,
java.util.HashMap decodeparams,
java.io.InputStream input)
getEncryptionInputStream in interface SecurityHandlerInterfacepublic abstract byte[] getEncryptionKey()
SecurityHandlerInterface
getEncryptionKey in interface SecurityHandlerInterfacepublic abstract byte[] getDecryptionKey()
SecurityHandlerInterface
getDecryptionKey in interface SecurityHandlerInterfacepublic abstract java.lang.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 | ||||||||