freiheit.com technologies gmbh

## com.freiheit.gnupg
Class GnuPGPassphraseWindow

    java.lang.Object
      com.freiheit.gnupg.GnuPGPassphraseWindow

All Implemented Interfaces:
  GnuPGPassphraseListener

    public class GnuPGPassphraseWindow

extends java.lang.Object
implements GnuPGPassphraseListener

Requests a passphrase for a crypto operation from the a swing dialog. This is triggered by gpgme. You must register this as a listener to the GnuPGContext. It generates a Swing-Dialog.

Author:
  Stefan Richter, stefan@freiheit.com
See Also:
  `GnuPGContext`

Constructor Summary
`GnuPGPassphraseWindow()` Default-Constructor.
`GnuPGPassphraseWindow(javax.swing.JFrame f)` Use this, if you use this library from a swing application.

Method Summary
`java.lang.String` `getPassphrase(java.lang.String hint, java.lang.String passphraseInfo, int wasBad)` Opens a Swing modal dialog, asks for the passphrase and returns it to gpgme.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GnuPGPassphraseWindow

    public GnuPGPassphraseWindow()

  Default-Constructor.

### GnuPGPassphraseWindow

    public GnuPGPassphraseWindow(javax.swing.JFrame f)

  Use this, if you use this library from a swing application.

  Parameters:
    `f` - where this passphrase dialog should be modal to. (See Swing-Documentation, if you don't know, what modal dialogs are!)

Method Detail

### getPassphrase

    public java.lang.String getPassphrase(java.lang.String hint,
                                          java.lang.String passphraseInfo,
                                          int wasBad)

  Opens a Swing modal dialog, asks for the passphrase and returns it to gpgme.

  Specified by:
    `getPassphrase` in interface `GnuPGPassphraseListener`
  Parameters:
    `hint` - TODO
    `passphraseInfo` - TODO
    `wasBad` - TODO
  Returns:
    passphrase to be supplied to gpgme callback (MUST include a \n at the end of the string)
  See Also:
    `GnuPGContext`

freiheit.com technologies gmbh

© 2005 freiheit.com technologies gmbh