SHOW Signed SHOW CryptoExtensionAPI

net.rim.device.api.crypto.encoder
Class CMS_SignatureDecoder

java.lang.Object
  |
  +--net.rim.device.api.crypto.encoder.SignatureDecoder
        |
        +--net.rim.device.api.crypto.encoder.CMS_SignatureDecoder

public class CMS_SignatureDecoder
extends SignatureDecoder

Implements the signature decoder for CMS.

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.
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.

Since:
JDE 4.0.2

Constructor Summary
 Category: Signed Category: CryptoExtensionAPI CMS_SignatureDecoder()
          Creates a new CMS_SignatureDecoder object.
 
Method Summary
 Category: Signed Category: CryptoExtensionAPI protected  DecodedSignature decodeSignature(ASN1InputByteArray parameters, byte[] encodedSignature, String algorithm, String digestString)
          The function a subclass would implement to finish decoding the signature.
 Category: Signed Category: CryptoExtensionAPI protected  DecodedSignature decodeSignature(InputStream encodedSignature, String signatureAlgorithm, String digestAlgorithm)
           
 Category: Signed Category: CryptoExtensionAPI protected  String getEncodingAlgorithm()
          Returns the encoding algorithm used, ie.
 Category: Signed Category: CryptoExtensionAPI protected  String[] getSignatureAlgorithms()
          Returns the signature algorithm used, such as "DSA", or "RSA_PKCS1_SHA1".
 
Methods inherited from class net.rim.device.api.crypto.encoder.SignatureDecoder
decode, decode, decode, decode, decode, getDecoder, register
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMS_SignatureDecoder

public CMS_SignatureDecoder()
Creates a new CMS_SignatureDecoder object.
Since:
JDE 4.0.2
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.
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.
Method Detail

decodeSignature

protected DecodedSignature decodeSignature(InputStream encodedSignature,
                                           String signatureAlgorithm,
                                           String digestAlgorithm)
                                    throws NoSuchAlgorithmException,
                                           InvalidSignatureEncodingException
Description copied from class: SignatureDecoder
Decodes the input stream.

Overrides:
decodeSignature in class SignatureDecoder
Since:
JDE 4.0.2
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.
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.

decodeSignature

protected DecodedSignature decodeSignature(ASN1InputByteArray parameters,
                                           byte[] encodedSignature,
                                           String algorithm,
                                           String digestString)
                                    throws NoSuchAlgorithmException,
                                           InvalidSignatureEncodingException
The function a subclass would implement to finish decoding the signature.

Parameters:
parameters - The parameters that specify the details of the encoding.
encodedSignature - A byte array containing the encoded signature.
algorithm - A String representing the name of the algorithm used to encode the data.
digestString - A String representing any parameters required by the signature decoder. Often this is a digest. Can be null.
Returns:
The decoded signature.
Throws:
NoSuchAlgorithmException - Thrown if the specified algorithm is invalid.
InvalidSignatureEncodingException - Thrown if the signature is improperly formatted or invalid.
Since:
JDE 4.0.2
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.
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.

getEncodingAlgorithm

protected String getEncodingAlgorithm()
Returns the encoding algorithm used, ie. "CMS".

This method will always return the String "CMS".

Overrides:
getEncodingAlgorithm in class SignatureDecoder
Returns:
A String that represents the name of the encoding algorithm.
Since:
JDE 4.0.2
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.
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.

getSignatureAlgorithms

protected String[] getSignatureAlgorithms()
Returns the signature algorithm used, such as "DSA", or "RSA_PKCS1_SHA1".

Overrides:
getSignatureAlgorithms in class SignatureDecoder
Returns:
An array of Strings representing the signature algorithms.
Since:
JDE 4.0.2
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.
CryptoExtensionAPI: This element is part of the Crypto Extension API. These APIs are intended for parties interested in extending the security provider frameworks, such as integrating a new security medium.


Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.