org.faceless.pdf2.viewer2
Class PublicKeyPromptEncryptionHandler
java.lang.Object
org.faceless.pdf2.EncryptionHandler
org.faceless.pdf2.PublicKeyEncryptionHandler
org.faceless.pdf2.viewer2.PublicKeyPromptEncryptionHandler
- All Implemented Interfaces:
- Cloneable
public class PublicKeyPromptEncryptionHandler
- extends PublicKeyEncryptionHandler
An extension of the PublicKeyEncryptionHandler
that will pop up a
dialog allowing the user to select a KeyStore to select a private key from
if necessary.
This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.
- Since:
- 2.8.2
Methods inherited from class org.faceless.pdf2.PublicKeyEncryptionHandler |
addRecipient, finishedDecrypt, finishedEncrypt, getChange, getDecryptionStream, getDescription, getEncryptedStreamLength, getEncryptionStream, getExtract, getFilterName, getPrint, getSubFilterName, hasRight, isMetadataEncrypted, isRequired, prepareToDecrypt, prepareToEncrypt, setDecryptionKey, setEncryptedMetadata |
Methods inherited from class org.faceless.pdf2.EncryptionHandler |
clone, containsKey, getArrayValueSize, getBooleanValue, getDecryptedStreamLength, getDictionaryValueKeys, getFileId, getNameValue, getNumericValue, getStringValue, getTextStringValue, isEmbeddedFileEncrypted, isStreamEncrypted, isStringEncrypted, markChanged, putArrayValue, putBooleanValue, putDictionaryValue, putNameValue, putNumericValue, putStringValue, putTextStringValue, setFileId |
PublicKeyPromptEncryptionHandler
public PublicKeyPromptEncryptionHandler(JComponent parent,
KeyStoreManager manager)
setAlias
public void setAlias(String alias,
char[] password)
chooseRecipient
protected boolean chooseRecipient(X500Principal[] issuers,
BigInteger[] serials)
- Description copied from class:
PublicKeyEncryptionHandler
- This method is called by
PublicKeyEncryptionHandler.prepareToDecrypt()
to give an implementation
the chance to select an appropriate entry from the KeyStore if it hasn't
already been done. The supplied arrays are equal length and indicate
the Issuer and SerialNumber of all the recipients that can decrypt this
document. By default this method does nothing.
- Overrides:
chooseRecipient
in class PublicKeyEncryptionHandler
- Parameters:
issuers
- an array listing all the X.509 Certificate Issuersserials
- an array listing all the X.509 Certificate Serial Numbers.
- Returns:
- true if the decryption should continue, false otherwise
Copyright © 2001-2010 Big Faceless Organization