FileDocCategorySizeDatePackage
IvParameterSpec.javaAPI DocphoneME MR2 API (J2ME)2587Wed May 02 18:00:38 BST 2007javax.crypto.spec

IvParameterSpec

public class IvParameterSpec extends Object implements AlgorithmParameterSpec
This class specifies an initialization vector (IV). Examples which use IVs are ciphers in feedback mode, e.g., DES in CBC mode and RSA ciphers with OAEP encoding operation.
version
1.14, 09/13/01
since
1.4

Fields Summary
private byte[]
IV
Initial vector.
Constructors Summary
public IvParameterSpec(byte[] iv, int offset, int len)
Uses the first len bytes in iv, beginning at offset inclusive, as the IV.

The bytes that constitute the IV are those between iv[offset] and iv[offset+len-1] inclusive.

param
iv the buffer with the IV
param
offset the offset in iv where the IV starts
param
len the number of IV bytes

 
        IV = new byte[len];
        System.arraycopy(iv, offset, IV, 0, len);
    
Methods Summary
public byte[]getIV()
Returns the initialization vector (IV).

return
the initialization vector (IV)

        return Util.cloneArray(IV);