|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neuclear.commons.crypto.signers.PersonalSigner
public class PersonalSigner
User: pelleb Date: May 13, 2004 Time: 9:12:42 AM
| Field Summary |
|---|
| Fields inherited from interface org.neuclear.commons.crypto.signers.Signer |
|---|
KEY_DSA, KEY_NONE, KEY_OTHER, KEY_RSA |
| Constructor Summary | |
|---|---|
PersonalSigner(javax.swing.JFrame frame)
|
|
| Method Summary | |
|---|---|
void |
addListDataListener(javax.swing.event.ListDataListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
boolean |
canSignFor(java.lang.String name)
Returns true if the Signer contains a signer for the given name |
void |
createKeyPair(java.lang.String alias,
char[] passphrase)
|
protected void |
fireListUpdated()
|
java.security.PublicKey |
generateKey()
Creates a new KeyPair, stores the PrivateKey using the base32 sha1 of the public key as it's alias and returns the PublicKey. |
java.security.PublicKey |
generateKey(java.lang.String alias)
Creates a new KeyPair, stores the PrivateKey using the given alias and returns the PublicKey. |
java.lang.Object |
getElementAt(int index)
Returns the value at the specified index. |
int |
getKeyType(java.lang.String name)
Checks the key type of the given alias |
java.security.PublicKey |
getPublicKey(java.lang.String name)
|
java.lang.Object |
getSelectedItem()
|
int |
getSize()
Returns the length of the list. |
boolean |
isOpen()
|
java.util.Iterator |
iterator()
|
void |
open()
|
void |
removeListDataListener(javax.swing.event.ListDataListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
save()
|
void |
save(boolean force)
|
void |
setSelectedItem(java.lang.Object anItem)
|
byte[] |
sign(byte[] data,
SetPublicKeyCallBack callback)
|
byte[] |
sign(java.lang.String name,
byte[] data)
Signs the data with the privatekey of the given name |
byte[] |
sign(java.lang.String name,
char[] pass,
byte[] data,
SetPublicKeyCallBack callback)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersonalSigner(javax.swing.JFrame frame)
| Method Detail |
|---|
public final byte[] sign(java.lang.String name,
byte[] data)
throws NonExistingSignerException,
UserCancellationException
Signer
sign in interface Signername - Alias of private key to be used within KeyStoredata - Data to be signed
NonExistingSignerException
UserCancellationException
public void open()
throws UserCancellationException
UserCancellationExceptionpublic final boolean canSignFor(java.lang.String name)
Signer
canSignFor in interface Signerpublic final int getKeyType(java.lang.String name)
Signer
getKeyType in interface Signer
public final java.security.PublicKey generateKey(java.lang.String alias)
throws UserCancellationException
Signer
generateKey in interface SignerUserCancellationException
public java.security.PublicKey generateKey()
throws UserCancellationException
Signer
generateKey in interface SignerUserCancellationException
public final java.security.PublicKey getPublicKey(java.lang.String name)
throws NonExistingSignerException
getPublicKey in interface PublicKeySourceNonExistingSignerException
public byte[] sign(byte[] data,
SetPublicKeyCallBack callback)
throws UserCancellationException
sign in interface BrowsableSignerUserCancellationException
public byte[] sign(java.lang.String name,
char[] pass,
byte[] data,
SetPublicKeyCallBack callback)
throws InvalidPassphraseException
sign in interface BrowsableSignerInvalidPassphraseException
public void createKeyPair(java.lang.String alias,
char[] passphrase)
throws CryptoException
createKeyPair in interface BrowsableSignerCryptoExceptionpublic void save()
save in interface Signer
public void save(boolean force)
throws java.io.IOException,
UserCancellationException
java.io.IOException
UserCancellationExceptionpublic boolean isOpen()
public java.util.Iterator iterator()
throws java.security.KeyStoreException
iterator in interface BrowsableSignerjava.security.KeyStoreExceptionpublic int getSize()
getSize in interface javax.swing.ListModelpublic java.lang.Object getElementAt(int index)
getElementAt in interface javax.swing.ListModelindex - the requested index
indexpublic void addListDataListener(javax.swing.event.ListDataListener l)
addListDataListener in interface javax.swing.ListModell - the ListDataListener to be addedpublic void removeListDataListener(javax.swing.event.ListDataListener l)
removeListDataListener in interface javax.swing.ListModell - the ListDataListener to be removedprotected void fireListUpdated()
public java.lang.Object getSelectedItem()
getSelectedItem in interface javax.swing.ComboBoxModelpublic void setSelectedItem(java.lang.Object anItem)
setSelectedItem in interface javax.swing.ComboBoxModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||