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

java.lang.Object
  extended by net.rim.device.api.crypto.encoder.PublicKeyDecoder
      extended by net.rim.device.api.crypto.encoder.WTLS_PublicKeyDecoder

public class WTLS_PublicKeyDecoder
extends PublicKeyDecoder

Implements the public key decoder for WTLS.

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

Constructor Summary
Category: Signed WTLS_PublicKeyDecoder()
          Creates a WTLS_PublicKeyDecoder object.
 
Method Summary
Category: Signed  PublicKey decodeKey(InputStream encodedKey, CryptoSystem cryptoSystem, String keyAlgorithm)
          Decodes the passed in key.
Category: Signed  String getEncodingAlgorithm()
          Returns the encoding algorithm used, "WTLS".
Category: Signed  String[] getKeyAlgorithms()
          Returns the key algorithm encoded.
 
Methods inherited from class net.rim.device.api.crypto.encoder.PublicKeyDecoder
decode, decode, decode, decode, getDecoder, register
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

WTLS_PublicKeyDecoder

public WTLS_PublicKeyDecoder()
Creates a WTLS_PublicKeyDecoder object.

This is the default constructor.

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 Detail

decodeKey

public PublicKey decodeKey(InputStream encodedKey,
                           CryptoSystem cryptoSystem,
                           String keyAlgorithm)
                    throws NoSuchAlgorithmException,
                           InvalidKeyException,
                           InvalidKeyEncodingException,
                           CryptoTokenException,
                           IOException,
                           InvalidCryptoSystemException,
                           UnsupportedCryptoSystemException,
                           CryptoUnsupportedOperationException
Description copied from class: PublicKeyDecoder
Decodes the passed in key.

Specified by:
decodeKey in class PublicKeyDecoder
Parameters:
encodedKey - The public key to decode, passed in as an input stream.
cryptoSystem - A cryptoSystem containing the parameters to use in making this key.
keyAlgorithm - The type of key.
Returns:
The decoded public key.
Throws:
NoSuchAlgorithmException - Thrown if the specified algorithm is invalid.
InvalidKeyException - Thrown if the specified key is invalid.
InvalidKeyEncodingException - Thrown if the key is improperly formatted.
CryptoTokenException - Thrown if an error occurs with the crypto token or the crypto token is invalid.
IOException - Thrown when an I/O error occurs.
InvalidCryptoSystemException - Thrown if the specified crypto system is invalid.
UnsupportedCryptoSystemException - Thrown if the specified crypto system is unsupported.
CryptoUnsupportedOperationException - Thrown if 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

getEncodingAlgorithm

public String getEncodingAlgorithm()
Returns the encoding algorithm used, "WTLS".

This method will always return the String "WTLS".

Specified by:
getEncodingAlgorithm in class PublicKeyDecoder
Returns:
A String representing the name of the encoding 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

getKeyAlgorithms

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

Specified by:
getKeyAlgorithms in class PublicKeyDecoder
Returns:
An array of Strings that represent the names of the key algorithms.
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-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.