Class 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
    • Constructor Detail

    • Method Detail

      • 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 Issuers
        serials - an array listing all the X.509 Certificate Serial Numbers.
        Returns:
        true if the decryption should continue, false otherwise