javax.crypto.spec

Class IvParameterSpec

public class IvParameterSpec extends Object implements AlgorithmParameterSpec

A wrapper for an initialization vector. An initialization vector is necessary for any cipher in any feedback mode, e.g. CBC.
Constructor Summary
IvParameterSpec(byte[] iv)
Create a new initialization vector spec from an entire byte array.
IvParameterSpec(byte[] iv, int off, int len)
Create a new initialization vector spec from part of a byte array.
Method Summary
byte[]getIV()
Returns the IV.

Constructor Detail

IvParameterSpec

public IvParameterSpec(byte[] iv)
Create a new initialization vector spec from an entire byte array.

Parameters: iv The IV bytes.

IvParameterSpec

public IvParameterSpec(byte[] iv, int off, int len)
Create a new initialization vector spec from part of a byte array.

Parameters: iv The IV bytes. off The offset into the IV bytes. len The number of IV bytes.

Method Detail

getIV

public byte[] getIV()
Returns the IV. This method does not copy the byte array.

Returns: The IV.