Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

IvParameterSpec

extends Object
implements AlgorithmParameterSpec
java.lang.Object
   ↳ javax.crypto.spec.IvParameterSpec

Class Overview

The algorithm parameter specification for an initialization vector .

Summary

Public Constructors
IvParameterSpec (byte[] iv)
Creates a new IvParameterSpec instance with the bytes from the specified buffer iv used as initialization vector .
IvParameterSpec (byte[] iv, int offset, int byteCount)
Creates a new IvParameterSpec instance with byteCount bytes from the specified buffer iv starting at offset .
Public Methods
byte[] getIV ()
Returns a copy of the initialization vector data.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IvParameterSpec (byte[] iv)

Added in API level 1

Creates a new IvParameterSpec instance with the bytes from the specified buffer iv used as initialization vector .

Parameters
iv the buffer used as initialization vector.
Throws
NullPointerException if the specified buffer is null.

public IvParameterSpec (byte[] iv, int offset, int byteCount)

Added in API level 1

Creates a new IvParameterSpec instance with byteCount bytes from the specified buffer iv starting at offset .

Throws
IllegalArgumentException if the specified buffer is null or offset and byteCount do not specify a valid chunk in the specified buffer.
ArrayIndexOutOfBoundsException if offset or byteCount are negative.

Public Methods

public byte[] getIV ()

Added in API level 1

Returns a copy of the initialization vector data.

Returns
  • a copy of the initialization vector data.