SHOW Signed SHOW CryptoExtensionAPI

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

java.lang.Object
  |
  +--net.rim.device.api.crypto.encoder.PrivateKeyDecoder
        |
        +--net.rim.device.api.crypto.encoder.MSCAPI_PrivateKeyDecoder

public class MSCAPI_PrivateKeyDecoder
extends PrivateKeyDecoder

Implements the private key decoder for Microsoft Crypto api keys.

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 3.6.0
See Also:
MSCAPI_PublicKeyDecoder

Constructor Summary
 Category: Signed Category: CryptoExtensionAPI MSCAPI_PrivateKeyDecoder()
          Creates a new MSCAPI_PrivateKeyDecoder object.
 
Method Summary
 Category: Signed Category: CryptoExtensionAPI protected  PrivateKey decodeKey(InputStream input, CryptoSystem defaultCryptoSystem, String defaultKeyAlgorithm)
           
 Category: Signed Category: CryptoExtensionAPI protected  PrivateKey decodeKey(InputStream input, String algorithm)
          The function a subclass would implement to finish decoding the key.
 Category: Signed Category: CryptoExtensionAPI protected  String getEncodingAlgorithm()
          Returns the encoding algorithm used, "MSCAPI".
 Category: Signed Category: CryptoExtensionAPI protected  String[] getKeyAlgorithms()
          Returns the key algorithm encoded.
 
Methods inherited from class net.rim.device.api.crypto.encoder.PrivateKeyDecoder
decode, decode, decode, decode, getDecoder, register
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MSCAPI_PrivateKeyDecoder

public MSCAPI_PrivateKeyDecoder()
Creates a new MSCAPI_PrivateKeyDecoder object.

This is the default constructor.

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.
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

decodeKey

protected PrivateKey decodeKey(InputStream input,
                               CryptoSystem defaultCryptoSystem,
                               String defaultKeyAlgorithm)
                        throws NoSuchAlgorithmException,
                               InvalidKeyEncodingException,
                               InvalidKeyException,
                               InvalidCryptoSystemException,
                               UnsupportedCryptoSystemException,
                               CryptoTokenException,
                               CryptoUnsupportedOperationException,
                               IOException
Description copied from class: PrivateKeyDecoder
Decodes the specified key.

This method must be implemented by subclasses.

Overrides:
decodeKey in class PrivateKeyDecoder
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.
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.

decodeKey

protected PrivateKey decodeKey(InputStream input,
                               String algorithm)
                        throws NoSuchAlgorithmException,
                               InvalidKeyEncodingException,
                               InvalidKeyException,
                               InvalidCryptoSystemException,
                               UnsupportedCryptoSystemException,
                               CryptoTokenException,
                               CryptoUnsupportedOperationException,
                               IOException
The function a subclass would implement to finish decoding the key.

Parameters:
input - The input stream containing the encoded key data.
algorithm - A String representing the name of the algorithm used to encode the key.
Returns:
The decoded private key.
Throws:
NoSuchAlgorithmException - Thrown if the specified algorithm is invalid.
InvalidKeyEncodingException - Thrown if the key is improperly formatted or encoded.
InvalidKeyException - Thrown if the key is invalid.
InvalidCryptoSystemException - Thrown if the crypto system is invalid.
UnsupportedCryptoSystemException - Thrown if the crypto system in question is invalid.
CryptoTokenException - Thrown if a problem occurs with the crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
IOException - Thrown if an I/O error occurs.
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.
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, "MSCAPI".

This method will always return the String "MSCAPI".

Overrides:
getEncodingAlgorithm in class PrivateKeyDecoder
Returns:
A String representing the name of the encoding algorithm.
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.
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.

getKeyAlgorithms

protected String[] getKeyAlgorithms()
Returns the key algorithm encoded.

Overrides:
getKeyAlgorithms in class PrivateKeyDecoder
Returns:
An array of Strings representing the key algorithm.
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.
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.