gnu.crypto.jce.spec

Class BlockCipherParameterSpec

Implemented Interfaces:
AlgorithmParameterSpec

public class BlockCipherParameterSpec
extends java.lang.Object
implements AlgorithmParameterSpec

Block cipher parameters in GNU Crypto are the cipher's name, its block and key sizes, and an optional initialization vector.

Version:
$Revision: 1.1 $

Field Summary

protected int
blockSize
The cipher's block size, in bytes.
protected byte[]
iv
The initialization vector.
protected int
keySize
The cipher's key size, in bytes.

Constructor Summary

BlockCipherParameterSpec(byte[] iv, int blockSize, int keySize)
Create a new parameter specification.
BlockCipherParameterSpec(int blockSize, int keySize)
Create a new parameter specification with no IV.

Method Summary

int
getBlockSize()
Get the block size of the cipher these parameters are for.
byte[]
getIV()
Get the initialization vector for the cipher, or null if there is no IV.
int
getKeySize()
Get the key size of the cipher these parameters are for.
String
toString()

Field Details

blockSize

protected int blockSize
The cipher's block size, in bytes.


iv

protected byte[] iv
The initialization vector.


keySize

protected int keySize
The cipher's key size, in bytes.

Constructor Details

BlockCipherParameterSpec

public BlockCipherParameterSpec(byte[] iv,
                                int blockSize,
                                int keySize)
Create a new parameter specification.

Parameters:
iv - The initialization vector, or null if there is no IV.
blockSize - The cipher's block size, in bytes.
keySize - The cipher's key size, in bytes.


BlockCipherParameterSpec

public BlockCipherParameterSpec(int blockSize,
                                int keySize)
Create a new parameter specification with no IV.

Parameters:
blockSize - The cipher's block size, in bytes.
keySize - The cipher's key size, in bytes.

Method Details

getBlockSize

public int getBlockSize()
Get the block size of the cipher these parameters are for.

Returns:
The block size.


getIV

public byte[] getIV()
Get the initialization vector for the cipher, or null if there is no IV.

Returns:
The IV.


getKeySize

public int getKeySize()
Get the key size of the cipher these parameters are for.

Returns:
The block size.


toString

public String toString()


Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.