SHOW Signed

net.rim.device.api.crypto
Class X931SignatureVerifier

java.lang.Object
  |
  +--net.rim.device.api.crypto.X931SignatureVerifier
All Implemented Interfaces:
SignatureVerifier

public final class X931SignatureVerifier
extends Object
implements SignatureVerifier

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.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0
See Also:
X931SignatureSigner

Constructor Summary
 Category: Signed X931SignatureVerifier(RSAPublicKey key, byte[] signature, int signatureOffset)
          Creates a new X931SignatureVerifier object.
 Category: Signed X931SignatureVerifier(RSAPublicKey key, Digest digest, byte[] signature, int signatureOffset)
          Creates a new X931SignatureVerifier object given a digest as an additional parameter.
 
Method Summary
 Category: Signed  String getAlgorithm()
          Returns the name of the signing algorithm used, eg "DSA", "ECDSA", etc.
 Category: Signed  void update(byte[] data)
          Adds additional message data to the signature.
 Category: Signed  void update(byte[] data, int offset, int length)
          Adds additional message data to the signature.
 Category: Signed  void update(int data)
          Adds additional message data to the signature.
 Category: Signed  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

X931SignatureVerifier

public X931SignatureVerifier(RSAPublicKey key,
                             byte[] signature,
                             int signatureOffset)
                      throws InvalidSignatureEncodingException
Creates a new X931SignatureVerifier object.

Parameters:
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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

X931SignatureVerifier

public X931SignatureVerifier(RSAPublicKey key,
                             Digest digest,
                             byte[] signature,
                             int signatureOffset)
                      throws InvalidSignatureEncodingException
Creates a new X931SignatureVerifier object given a digest as an additional parameter.

Parameters:
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.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

getAlgorithm

public String getAlgorithm()
Description copied from interface: SignatureVerifier
Returns the name of the signing algorithm used, eg "DSA", "ECDSA", etc.

Specified by:
getAlgorithm in interface SignatureVerifier
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

update

public void update(int data)
Description copied from interface: SignatureVerifier
Adds additional message data to the signature.

Specified by:
update in interface SignatureVerifier
Since:
JDE 3.7.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

update

public void update(byte[] data)
Description copied from interface: SignatureVerifier
Adds additional message data to the signature.

Specified by:
update in interface SignatureVerifier
Since:
JDE 3.7.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

update

public void update(byte[] data,
                   int offset,
                   int length)
Description copied from interface: SignatureVerifier
Adds additional message data to the signature.

Specified by:
update in interface SignatureVerifier
Since:
JDE 3.7.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

verify

public boolean verify()
               throws CryptoTokenException,
                      CryptoUnsupportedOperationException
Description copied from interface: SignatureVerifier
Returns true if the signature is valid, false otherwise.

Specified by:
verify in interface SignatureVerifier
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


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.