Class PassphraseCallback

    • Constructor Detail

      • PassphraseCallback

        public PassphraseCallback​(String prompt)
        Construct a PassphraseCallback with a prompt.
        Parameters:
        prompt - the prompt used to request the passphrase.
        Throws:
        IllegalArgumentException - if prompt is null.
      • PassphraseCallback

        public PassphraseCallback​(String prompt,
                                  String defaultPassphrase)
        Construct a PassphraseCallback with a prompt and default passphrase.

        Parameters:
        prompt - the prompt used to request the information.

        defaultPassphrase - the name to be used as the default name displayed with the prompt.
        Throws:
        IllegalArgumentException - if prompt is null.
    • Method Detail

      • getPrompt

        public String getPrompt()
        Get the prompt.

        Returns:
        the prompt.
      • getDefaultPassphrase

        public String getDefaultPassphrase()
        Get the default passphrase.

        Returns:
        the default passphrase, or null if this PassphraseCallback was not instantiated with a defaultPassphrase.
      • setPassphrase

        public void setPassphrase​(String pw)
        Set the retrieved passphrase.

        Parameters:
        pw - the passphrase (which may be null).
        See Also:
        getPassphrase()