public final class PublicKeySecurityHandler extends SecurityHandler<PublicKeyProtectionPolicy>
to see how to protect document with this
security handler.
Constructor and Description |
---|
PublicKeySecurityHandler()
Constructor.
|
PublicKeySecurityHandler(PublicKeyProtectionPolicy publicKeyProtectionPolicy)
Constructor used for encryption.
|
Modifier and Type | Method and Description |
---|---|
void |
prepareDocumentForEncryption(PDEncryption dictionary,
byte[] documentID)
Prepare the document for encryption.
|
void |
prepareForDecryption(PDEncryption encryption,
byte[] documentIDBytes,
DecryptionMaterial decryptionMaterial)
Prepares everything to decrypt the document.
|
decryptBuffer, getCurrentAccessPermission, getEncryptionKey, getKeyLength, hasProtectionPolicy, isAES, isDecryptMetadata, setAES, setCurrentAccessPermission, setCustomSecureRandom, setEncryptionKey, setKeyLength, setParams
public static final String FILTER
public PublicKeySecurityHandler()
public PublicKeySecurityHandler(PublicKeyProtectionPolicy publicKeyProtectionPolicy)
publicKeyProtectionPolicy
- The protection policy.public void prepareForDecryption(PDEncryption encryption, byte[] documentIDBytes, DecryptionMaterial decryptionMaterial) throws IOException
prepareForDecryption
in class SecurityHandler<PublicKeyProtectionPolicy>
encryption
- encryption dictionarydocumentIDBytes
- document id bytes
(not used by this handler)decryptionMaterial
- Information used to decrypt the document.IOException
- If there is an error accessing data. If verbose mode is
enabled, the exception message will provide more details
why the match wasn't successful.public void prepareDocumentForEncryption(PDEncryption dictionary, byte[] documentID) throws IOException
prepareDocumentForEncryption
in class SecurityHandler<PublicKeyProtectionPolicy>
dictionary
- encryption dictionarydocumentID
- document ID bytesIOException
- If there is an error while encrypting.Revision 4.1.0 / 20211203-0554