net.rim.device.api.crypto
Interface SignatureVerifier
- All Known Implementing Classes:
- DSASignatureVerifier, ECDSASignatureVerifier, ECNRSignatureVerifier, NullSignatureVerifier, PKCS1SignatureVerifier, PSSSignatureVerifier, X931SignatureVerifier
public interface SignatureVerifier
Defines the functions that are required for use with all of the signature
verifiers that are implemented in the system.
A more complete description of what each function should perform can be found
at the class level for each implementing class.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
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. |
getAlgorithm
String getAlgorithm()
- Returns the name of the signing algorithm used, eg "DSA", "ECDSA", etc.
- Returns:
- A String representing the name of the algorithm.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
update
void update(int data)
- Adds additional message data to the signature.
- Parameters:
data
- The byte to be hashed.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
update
void update(byte[] data)
- Adds additional message data to the signature.
- Parameters:
data
- A byte array containing the message data to hash.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
update
void update(byte[] data,
int offset,
int length)
- Adds additional message data to the signature.
- Parameters:
data
- The message data to hash.offset
- The offset, or initial position to start reading in the data.length
- The amount of data to read.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
verify
boolean verify()
throws CryptoTokenException,
CryptoUnsupportedOperationException
- Returns true if the signature is valid, false otherwise.
- Returns:
- A boolean that returns true if the signature is valid, false otherwise.
- Throws:
CryptoTokenException
- Thrown when a problem occurs with a crypto
token or the crypto token is invalid.
CryptoUnsupportedOperationException
- Thrown when a call is made to
an unsupported operation.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 3.6.0
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal