Specifications
iDEN i325 J2ME™ Developers’ Guide
Page 111
2004 Motorola, Inc.
16.3.1.2. update
Updates the digest with the specified bytes.
public void update(byte[] input, int offset, int len)
This method updates the message digest with an array of bytes that represents one of
several parts of a single message. A message can be submitted in separate blocks. This
method can be called multiple times.
input is the array of bytes. offset is the offset to start from in the array of bytes. len is the
number of bytes to use.
16.3.1.3. digest
Returns a completed digest, created from the parts specified with calls to update().
public byte[] digest()
After you finish updating the entire message, this method finishes the operation and produces
the digest.
16.3.2. Cipher Methods
16.3.2.1. getInstance
Creates a Cipher instance.
public static final Cipher getInstance(String transformation)
throws NoSuchAlgorithmException, NoSuchPaddingException
This method generates a Cipher instance that represents a certain cipher algorithm and
possible associated padding scheme.
transformation is the name of the transformation in the form “algorithm/mode/padding” or
“algorithm”; for example, "DES/CBC/PKCS5Padding" or "DES".
If the transformation is specified by algorithm only, the mode and padding are set to the
default values for the algorithm provider.
The following table lists all supported cipher algorithms, modes, and padding.
Table 9. Supported Cipher Algorithms on the i325 Phone
Algorithm Mode Padding
DES ECB;CBC;CFB;OFB PKCS5Padding
DESede ECB;CBC;CFB;OFB PKCS5Padding
AES ECB;CBC;CFB_128;OFB_128 PKCS5Padding
ARC4 (or RC4)
----- -----
16.3.2.2. init
Initializes a Cipher instance with an operation mode, key, and algorithm specifications.
public final void init(int opmode, Key key,
AlgorithmParameterSpec params)
throws InvalidKeyException, InvalidAlgorithmParameterException
Before you perform any other operation on the Cipher, call this method to initialize it with the
operation mode (encrypt or decrypt), a key, and the proper algorithm parameters (such as the
initial vector).










