- com
- pcbsys
- nirvana
- client
- nPassphraseSigner
This class signs an event with a digest of the event and the passphrase. More...
Public Member Functions | |
Provider | getProvider () |
Return the Provider used to vend the Digest class. More... | |
nPassphraseSigner (String passphrase) throws NoSuchAlgorithmException, nIllegalArgumentException | |
Constructs a message signer with the supplied passphrase. More... | |
nPassphraseSigner (String passphrase, String algorithm) throws NoSuchAlgorithmException, nIllegalArgumentException | |
Constructs a message signer with the supplied passphrase. More... | |
byte[] | sign () throws Exception |
Return the message digest and reset the digest. More... | |
void | update (byte[] data) throws Exception |
Adds the data to the digest. More... | |
Static Public Member Functions | |
static String | getDefaultAlgorithm () |
Get the default algorithm that will be used if no algorithm is supplied. More... | |
This class signs an event with a digest of the event and the passphrase.
The digest is created by
com.pcbsys.nirvana.client.nPassphraseSigner.nPassphraseSigner | ( | String | passphrase | ) | throws NoSuchAlgorithmException, nIllegalArgumentException |
Constructs a message signer with the supplied passphrase.
passphrase | String representation of the passphrase to use |
NoSuchAlgorithmException | If the algorithm can not be found |
nIllegalArgumentException | If any of the arguments are invalid |
com.pcbsys.nirvana.client.nPassphraseSigner.nPassphraseSigner | ( | String | passphrase, |
String | algorithm | ||
) | throws NoSuchAlgorithmException, nIllegalArgumentException |
Constructs a message signer with the supplied passphrase.
passphrase | String representation of the passphrase to use |
algorithm | Algorithm of a digest to use |
NoSuchAlgorithmException | If the algorithm can not be found |
nIllegalArgumentException | If any of the arguments are invalid |
|
static |
Get the default algorithm that will be used if no algorithm is supplied.
Currently this is SHA1 with RSA.
Provider com.pcbsys.nirvana.client.nPassphraseSigner.getProvider | ( | ) |
Return the Provider used to vend the Digest class.
Implements com.pcbsys.nirvana.client.nMessageSigner.
byte [] com.pcbsys.nirvana.client.nPassphraseSigner.sign | ( | ) | throws Exception |
Return the message digest and reset the digest.
Exception | If unable to produce the digest |
Implements com.pcbsys.nirvana.client.nMessageSigner.
void com.pcbsys.nirvana.client.nPassphraseSigner.update | ( | byte[] | data | ) | throws Exception |
Adds the data to the digest.
data | Data to add to the digest |
Exception | If unable to add the data to the digest |
Implements com.pcbsys.nirvana.client.nMessageSigner.