SHOW Signed

net.rim.device.api.crypto
Interface SymmetricKey

All Superinterfaces:
Key, Persistable, net.rim.vm.Persistable
All Known Implementing Classes:
AESKey, ARC4Key, CAST128Key, DESKey, RC2Key, RC5Key, SkipjackKey, TripleDESKey, HMACKey

public interface SymmetricKey
extends Key

SymmetricKey is an interface representing a key to be used in a symmetric key cryptographyic system.

A symmetric key system implies the same key is used for both decryption and encryption.

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.

Since:
JDE 3.6.0
See Also:
SymmetricKeyFactory

Method Summary
 Category: Signed  int getBitLength()
          Returns the number of bits that make up the actual keying material ( for example parity bits are not counted ).
 Category: Signed  byte[] getData()
          Returns a copy of the byte array representing the key.
 Category: Signed  int getLength()
          Returns the length of the key in bytes.
 
Methods inherited from interface net.rim.device.api.crypto.Key
getAlgorithm
 

Method Detail

getLength

public int getLength()
              throws CryptoTokenException,
                     CryptoUnsupportedOperationException
Returns the length of the key in bytes.

Returns:
An integer that represents the number of bytes.
Throws:
CryptoTokenException - Thrown when a problem occurs with a crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown when a call is made to an unsupported operation.
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.

getData

public byte[] getData()
               throws CryptoTokenException,
                      CryptoUnsupportedOperationException
Returns a copy of the byte array representing the key.

Returns:
A byte array containing the key.
Throws:
CryptoTokenException - Thrown when a problem occurs with a crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown when a call is made to an unsupported operation.
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.

getBitLength

public int getBitLength()
                 throws CryptoTokenException,
                        CryptoUnsupportedOperationException
Returns the number of bits that make up the actual keying material ( for example parity bits are not counted ).

Returns:
An integer that represents the number of bits in the key.
Throws:
CryptoTokenException - Thrown when a problem occurs with a crypto token or the crypto token is invalid.
CryptoUnsupportedOperationException - Thrown when a call is made to an unsupported operation.
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.


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.