|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.crypto.InitializationVectorFactory
Contains the functionality for a high level approach to creating InitializationVectors.
For more information on the cryptographic algorithms supported by this factory, see Crypto Algorithms.
NOTE: The implementation of this class may return an object that uses functionality provided by Certicom. In such cases, the calling code must have a license with Certicom, and be signed with the RCC code signing key. If the RCC code signature check fails, then a ControlledAccessException is thrown. For more information on the classes that use technology from Certicom, see Crypto Algorithms.
ControlledAccessException| Method Summary | ||
|
static Enumeration |
getAlgorithms()
Returns an Enumeration of String representing all of the
registered algorithms with this factory. |
|
static InitializationVector |
getInstance(String algorithm)
Constructs and returns a new random InitializationVector object. |
|
static InitializationVector |
getInstance(String algorithm,
byte[] data,
int offset)
Constructs and returns a new InitializationVector object. |
|
static InitializationVector |
getInstance(String algorithm,
byte[] data,
int offset,
int maxLength)
Constructs and returns a new InitializationVector object. |
|
static void |
register(String algorithm,
int defaultLength)
Registers the given InitializationVectorFactory. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static Enumeration getAlgorithms()
String representing all of the
registered algorithms with this factory.public static InitializationVector getInstance(String algorithm) throws NoSuchAlgorithmException
InitializationVector object.
A InitializationVector is selected based on the algorithm.
algorithm - The name of the InitializationVector to construct, eg "DES", "TripleDES"InitializationVector object.NoSuchAlgorithmException - Thrown if the InitializationVector cannot
be constructed or the specified algorithm is invalid.public static InitializationVector getInstance(String algorithm, byte[] data, int offset) throws NoSuchAlgorithmException
InitializationVector object.
A InitializationVector object is selected based on algorithm.
algorithm - The name of the InitializationVector to construct, eg "DES", "TripleDES".data - The iv data.offset - The start, or initial position, of the iv data within the
array.InitializationVector object.NoSuchAlgorithmException - Thrown if the InitializationVector
cannot be constructed or the specified algorithm is invalid.public static InitializationVector getInstance(String algorithm, byte[] data, int offset, int maxLength) throws NoSuchAlgorithmException
InitializationVector object.
The default length is used if algorithm does not specify a block length.
algorithm - The name of the InitializationVector to construct, eg "DES", "TripleDES".data - The iv data.offset - The start, or initial position, of the iv data within the array.maxLength - The maximum length, in bytes, of the data available to the iv. Not all of the data may be required depending on the algorithm.InitializationVector object.NoSuchAlgorithmException - Thrown if the InitializationVector cannot be
constructed or the specified algorithm is invalid.public static void register(String algorithm, int defaultLength)
InitializationVectorFactory.
If a previous call registered a default value for the length of the Initialization Vector then you cannot overwrite it.
algorithm - the algorithm that one is specifying the default length for.defaultLength - the default bit length of the algorithm.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 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.