|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.crypto.X931SignatureVerifier
Represents the X931 signature verifier. This Signature verifier is defined in the ANSI X9.31 standard.
Note : Currently the only digests defined for use with this signature signer are SHA1 and RIPEMD160. These are the only digests you can use with this class.
X931SignatureSigner| Constructor Summary | ||
|
X931SignatureVerifier(RSAPublicKey key,
byte[] signature,
int signatureOffset)
Creates a new X931SignatureVerifier object.
|
|
|
X931SignatureVerifier(RSAPublicKey key,
Digest digest,
byte[] signature,
int signatureOffset)
Creates a new X931SignatureVerifier object given a digest as
an additional parameter.
|
|
| Method Summary | ||
|
String |
getAlgorithm()
Returns the name of the signing algorithm used, eg "DSA", "ECDSA", etc. |
|
void |
update(byte[] data)
Adds additional message data to the signature. |
|
void |
update(byte[] data,
int offset,
int length)
Adds additional message data to the signature. |
|
void |
update(int data)
Adds additional message data to the signature. |
|
boolean |
verify()
Returns true if the signature is valid, false otherwise. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public X931SignatureVerifier(RSAPublicKey key, byte[] signature, int signatureOffset) throws InvalidSignatureEncodingException
X931SignatureVerifier object.
key - The Public key used to verifiy the signature.signature - A byte array containing the signature data.signatureOffset - The offset of the signature data within the array.public X931SignatureVerifier(RSAPublicKey key, Digest digest, byte[] signature, int signatureOffset) throws InvalidSignatureEncodingException
X931SignatureVerifier object given a digest as
an additional parameter.
key - The Public key used to verifiy the signature.digest - The digest used to verify the signature.signature - A byte array containing the signature data.signatureOffset - The offset of the signature data within the array.| Method Detail |
public String getAlgorithm()
SignatureVerifiergetAlgorithm in interface SignatureVerifierpublic void update(int data)
SignatureVerifierupdate in interface SignatureVerifierpublic void update(byte[] data)
SignatureVerifierupdate in interface SignatureVerifier
public void update(byte[] data,
int offset,
int length)
SignatureVerifierupdate in interface SignatureVerifier
public boolean verify()
throws CryptoTokenException,
CryptoUnsupportedOperationException
SignatureVerifierverify in interface SignatureVerifier
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.