org.neuclear.commons.crypto.passphraseagents
Class ConsoleAgent

java.lang.Object
  extended by org.neuclear.commons.crypto.passphraseagents.ConsoleAgent
All Implemented Interfaces:
InteractiveAgent, PassPhraseAgent

public final class ConsoleAgent
extends java.lang.Object
implements InteractiveAgent

User: pelleb Date: Oct 29, 2003 Time: 11:53:29 AM


Constructor Summary
ConsoleAgent()
           
 
Method Summary
 char[] getNewPassPhrase(java.lang.String name)
           
 java.io.File getOpenFileName(java.lang.String title, java.lang.String def)
           
 char[] getPassPhrase(BrowsableSigner signer)
          The User is asked to pick a name by the PassPhraseAgent.
 char[] getPassPhrase(java.lang.String name)
          Retrieve the PassPhrase for a given name/alias
 char[] getPassPhrase(java.lang.String name, boolean incorrect)
           
 java.io.File getSaveToFileName(java.lang.String title, java.lang.String def)
           
static void main(java.lang.String[] args)
           
 byte[] sign(BrowsableSigner signer, byte[] data, SetPublicKeyCallBack callback)
          The User is asked to pick a name by the PassPhraseAgent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleAgent

public ConsoleAgent()
Method Detail

getPassPhrase

public char[] getPassPhrase(java.lang.String name)
                     throws UserCancellationException
Description copied from interface: PassPhraseAgent
Retrieve the PassPhrase for a given name/alias

Specified by:
getPassPhrase in interface PassPhraseAgent
Returns:
Throws:
UserCancellationException

getPassPhrase

public final char[] getPassPhrase(java.lang.String name,
                                  boolean incorrect)
                           throws UserCancellationException
Specified by:
getPassPhrase in interface PassPhraseAgent
Throws:
UserCancellationException

main

public static void main(java.lang.String[] args)

getPassPhrase

public char[] getPassPhrase(BrowsableSigner signer)
                     throws UserCancellationException
The User is asked to pick a name by the PassPhraseAgent. The PassPhraseAgent can query the given signer for a list of included aliases or even create a new keypair.

Returns:
Throws:
UserCancellationException

sign

public byte[] sign(BrowsableSigner signer,
                   byte[] data,
                   SetPublicKeyCallBack callback)
            throws UserCancellationException
The User is asked to pick a name by the PassPhraseAgent. The PassPhraseAgent can query the given signer for a list of included aliases or even create a new keypair.

Specified by:
sign in interface InteractiveAgent
Returns:
Throws:
UserCancellationException

getSaveToFileName

public java.io.File getSaveToFileName(java.lang.String title,
                                      java.lang.String def)
                               throws UserCancellationException
Specified by:
getSaveToFileName in interface InteractiveAgent
Throws:
UserCancellationException

getOpenFileName

public java.io.File getOpenFileName(java.lang.String title,
                                    java.lang.String def)
                             throws UserCancellationException
Specified by:
getOpenFileName in interface InteractiveAgent
Throws:
UserCancellationException

getNewPassPhrase

public char[] getNewPassPhrase(java.lang.String name)
                        throws UserCancellationException
Specified by:
getNewPassPhrase in interface InteractiveAgent
Throws:
UserCancellationException


Copyright © 2003-2004 Antilles Software Ventures SA. All Rights Reserved.