|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Signer
The Signer follows the following model:
(Optional)
+---------------+
|PassPhraseAgent|
+-------+-------+
|PassPhrase
+-------------------+ +---+----+
|Signing Application|--Data-->| Signer |
+--------+----------+ +---+----+
+-<-----Signature--------+
| Field Summary | |
|---|---|
static int |
KEY_DSA
|
static int |
KEY_NONE
|
static int |
KEY_OTHER
|
static int |
KEY_RSA
|
| Method Summary | |
|---|---|
boolean |
canSignFor(java.lang.String name)
Returns true if the Signer contains a signer for the given name |
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. |
int |
getKeyType(java.lang.String name)
Checks the key type of the given alias |
void |
save()
|
byte[] |
sign(java.lang.String name,
byte[] data)
Signs the data with the privatekey of the given name |
| Field Detail |
|---|
static final int KEY_NONE
static final int KEY_RSA
static final int KEY_DSA
static final int KEY_OTHER
| Method Detail |
|---|
byte[] sign(java.lang.String name,
byte[] data)
throws UserCancellationException,
NonExistingSignerException
name - Alias of private key to be used within KeyStoredata - Data to be signed
UserCancellationException
NonExistingSignerExceptionboolean canSignFor(java.lang.String name)
name -
int getKeyType(java.lang.String name)
name -
java.security.PublicKey generateKey(java.lang.String alias)
throws UserCancellationException
alias -
UserCancellationException
java.security.PublicKey generateKey()
throws UserCancellationException
UserCancellationException
void save()
throws UserCancellationException
UserCancellationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||