|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.crypto.encoder.PublicKeyDecoder
net.rim.device.api.crypto.encoder.MSCAPI_PublicKeyDecoder
public class MSCAPI_PublicKeyDecoder
Implements the public key decoder for Microsoft Crypto api keys.
MSCAPI_PrivateKeyDecoder
Constructor Summary | ||
---|---|---|
|
MSCAPI_PublicKeyDecoder()
Creates a new MSCAPI_PublicKeyDecoder object. |
Method Summary | ||
---|---|---|
|
protected PublicKey |
decodeKey(InputStream input,
String algorithm)
Decodes the given key using the specified algorithm. |
|
protected PublicKey |
decodeKey(InputStream input,
CryptoSystem defaultCryptoSystem,
String defaultKeyAlgorithm)
Decodes the passed in key. |
|
String |
getEncodingAlgorithm()
Returns the encoding algorithm used, "MSCAPI". |
|
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 |
---|
public MSCAPI_PublicKeyDecoder()
MSCAPI_PublicKeyDecoder
object.
This is the default constructor.
Method Detail |
---|
protected PublicKey decodeKey(InputStream input, CryptoSystem defaultCryptoSystem, String defaultKeyAlgorithm) throws NoSuchAlgorithmException, InvalidKeyEncodingException, InvalidKeyException, InvalidCryptoSystemException, UnsupportedCryptoSystemException, CryptoTokenException, CryptoUnsupportedOperationException, IOException
PublicKeyDecoder
decodeKey
in class PublicKeyDecoder
input
- The public key to decode, passed in as an input stream.defaultCryptoSystem
- A cryptoSystem containing the parameters to use in making this key.defaultKeyAlgorithm
- The type of key.
NoSuchAlgorithmException
- Thrown if the specified algorithm is
invalid.
InvalidKeyEncodingException
- Thrown if the key is improperly
formatted.
InvalidKeyException
- Thrown if the specified key is invalid.
InvalidCryptoSystemException
- Thrown if the specified crypto
system is invalid.
UnsupportedCryptoSystemException
- Thrown if the specified crypto
system is unsupported.
CryptoTokenException
- Thrown if an error occurs with the crypto
token or the crypto token is invalid.
CryptoUnsupportedOperationException
- Thrown if a call is made to
an unsupported operation.
IOException
- Thrown when an I/O error occurs.protected PublicKey decodeKey(InputStream input, String algorithm) throws NoSuchAlgorithmException, InvalidKeyEncodingException, InvalidKeyException, InvalidCryptoSystemException, UnsupportedCryptoSystemException, CryptoTokenException, CryptoUnsupportedOperationException, IOException
Generally Implemented by subclasses to finish decoding the key.
input
- The input stream containing the key data.algorithm
- A String representing the algorithm used to encode the
key.
NoSuchAlgorithmException
- Thrown if the specified algorithm is
invalid.
InvalidKeyEncodingException
- Thrown if the key is improperly
formatted.
InvalidKeyException
- Thrown if the specified key is invalid.
InvalidCryptoSystemException
- Thrown if the specified crypto
system is invalid.
UnsupportedCryptoSystemException
- Thrown if the specified crypto
system is unsupported.
CryptoTokenException
- Thrown if an error occurs with the crypto
token or the crypto token is invalid.
CryptoUnsupportedOperationException
- Thrown if a call is made to
an unsupported operation.
IOException
- Thrown when an I/O error occurs.public String getEncodingAlgorithm()
This method will always return the String "MSCAPI".
getEncodingAlgorithm
in class PublicKeyDecoder
public String[] getKeyAlgorithms()
getKeyAlgorithms
in class PublicKeyDecoder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.