|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.crypto.InitializationVectorFactory
public class 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.
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 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 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) 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 Enumeration getAlgorithms()
String
representing all of the
registered algorithms with this factory.
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: 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.