|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.crypto.encoder.SymmetricKeyDecoder
net.rim.device.api.crypto.encoder.PKCS8_SymmetricKeyDecoder
public class PKCS8_SymmetricKeyDecoder
Implements the symmetric key decoder.
This class is modelled after after PKCS8.
PKCS8_PrivateKeyDecoder
Constructor Summary | ||
---|---|---|
|
PKCS8_SymmetricKeyDecoder()
Creates a new PKCS8_SymmetricKeyDecder object. |
Method Summary | ||
---|---|---|
|
protected SymmetricKey |
decodeKey(InputStream encodedKey,
String keyAlgorithm)
Decodes the passed in key. |
|
protected SymmetricKey |
decodeKey(ASN1InputStream parameters,
ASN1InputStream symmetricKeyInfo,
String algorithm)
Decodes a key. |
|
protected String |
getEncodingAlgorithm()
Returns the encoding algorithm used, "PKCS8". |
|
protected String[] |
getKeyAlgorithms()
Returns the key algorithm encoded. |
Methods inherited from class net.rim.device.api.crypto.encoder.SymmetricKeyDecoder |
---|
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 PKCS8_SymmetricKeyDecoder()
PKCS8_SymmetricKeyDecder
object.
This is the default constructor.
Method Detail |
---|
protected SymmetricKey decodeKey(InputStream encodedKey, String keyAlgorithm) throws NoSuchAlgorithmException, InvalidKeyEncodingException, InvalidKeyException, CryptoTokenException, CryptoUnsupportedOperationException, IOException
SymmetricKeyDecoder
decodeKey
in class SymmetricKeyDecoder
encodedKey
- An input stream containing the public key to decode.keyAlgorithm
- The type of key.
NoSuchAlgorithmException
- Thrown if the encoding algorithm cannot be found.
InvalidKeyEncodingException
- Thrown if the key is imporperly
formatted.
InvalidKeyException
- Thrown if the specified key is invalid.
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 if an I/O error occurs.protected SymmetricKey decodeKey(ASN1InputStream parameters, ASN1InputStream symmetricKeyInfo, String algorithm) throws NoSuchAlgorithmException, InvalidKeyEncodingException, InvalidKeyException, CryptoTokenException, CryptoUnsupportedOperationException, IOException, ASN1EncodingException
This method will typically be implemented by a subclass to finish decoding the key.
parameters
- The parameters that specify the details of the
encoding.symmetricKeyInfo
- The symmetric key info to be decoded.algorithm
- The algorithm used to encode and decode 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.
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.
ASN1EncodingException
- Thrown when the input stream is invalid or
an unexpected error occurs.protected String getEncodingAlgorithm()
getEncodingAlgorithm
in class SymmetricKeyDecoder
protected String[] getKeyAlgorithms()
getKeyAlgorithms
in class SymmetricKeyDecoder
|
|||||||||
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.