- com
- pcbsys
- nirvana
- client
- nPassphraseValidator
This class implements a message digest Validator. More...
Public Member Functions | |
Object | check (byte[] original) throws Exception |
Checks the original digest with the digest created with the update method. More... | |
Provider | getProvider () |
Return the Provider used to vend the Digest class. More... | |
nPassphraseValidator (String passphrase) throws NoSuchAlgorithmException, nIllegalArgumentException | |
Creates a nPassphraseValidator with the supplied passphrase. More... | |
nPassphraseValidator (String passphrase, String algorithm) throws NoSuchAlgorithmException, nIllegalArgumentException | |
Creates a nPassphraseValidator with the supplied passphrase. More... | |
void | start (byte[] sig) |
This method does nothing. More... | |
void | stop () |
This method does nothing. 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 implements a message digest Validator.
The digest is created by
com.pcbsys.nirvana.client.nPassphraseValidator.nPassphraseValidator | ( | String | passphrase | ) | throws NoSuchAlgorithmException, nIllegalArgumentException |
Creates a nPassphraseValidator with the supplied passphrase.
passphrase | String representation of the passphrase. The larger the better |
NoSuchAlgorithmException | If the current provider does not support the Algorithm |
nIllegalArgumentException | If any of the arguments are invalid |
com.pcbsys.nirvana.client.nPassphraseValidator.nPassphraseValidator | ( | String | passphrase, |
String | algorithm | ||
) | throws NoSuchAlgorithmException, nIllegalArgumentException |
Creates a nPassphraseValidator with the supplied passphrase.
passphrase | String representation of the passphrase. The larger the better |
algorithm | Algorithm name to use |
NoSuchAlgorithmException | If the current provider does not support the Algorithm |
nIllegalArgumentException | If any of the arguments are invalid |
Object com.pcbsys.nirvana.client.nPassphraseValidator.check | ( | byte[] | original | ) | throws Exception |
Checks the original digest with the digest created with the update method.
original | Original digest to compare with |
Exception | If the digests do not match |
Implements com.pcbsys.nirvana.client.nMessageValidator.
|
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.nPassphraseValidator.getProvider | ( | ) |
Return the Provider used to vend the Digest class.
Implements com.pcbsys.nirvana.client.nMessageValidator.
void com.pcbsys.nirvana.client.nPassphraseValidator.start | ( | byte[] | sig | ) |
This method does nothing.
Is required by the interface
Implements com.pcbsys.nirvana.client.nMessageValidator.
void com.pcbsys.nirvana.client.nPassphraseValidator.stop | ( | ) |
This method does nothing.
Is required by the interface
Implements com.pcbsys.nirvana.client.nMessageValidator.
void com.pcbsys.nirvana.client.nPassphraseValidator.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.nMessageValidator.