Skip to content

Most visited

Recently visited

navigation
Added in API level 1

IvParameterSpec

public class IvParameterSpec
extends Object implements AlgorithmParameterSpec

java.lang.Object
   ↳ javax.crypto.spec.IvParameterSpec


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.

Inherited methods

From class java.lang.Object

Public constructors

IvParameterSpec

Added in API level 1
IvParameterSpec (byte[] iv)

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

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

IvParameterSpec

Added in API level 1
IvParameterSpec (byte[] iv, 
                int offset, 
                int byteCount)

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

Parameters
iv byte
offset int
byteCount int
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

getIV

Added in API level 1
byte[] getIV ()

Returns a copy of the initialization vector data.

Returns
byte[] a copy of the initialization vector data.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.