BlockCipherParameterSpec (GNU cryptographic primitives and tools)
Keywords: gnu.crypto.jce.spec.BlockCipherParameterSpec,BlockCipherParameterSpec class

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.crypto.jce.spec
Class BlockCipherParameterSpec

    java.lang.Object
      |
      +--gnu.crypto.jce.spec.BlockCipherParameterSpec

All Implemented Interfaces:
  java.security.spec.AlgorithmParameterSpec

public class BlockCipherParameterSpec
extends java.lang.Object
implements java.security.spec.AlgorithmParameterSpec

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

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.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### iv

    protected byte[] iv

  The initialization vector.

### blockSize

    protected int blockSize

  The cipher's block size, in bytes.

### keySize

    protected int keySize

  The cipher's key size, in bytes.

Constructor Detail

### 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 Detail

### getIV

    public byte[] getIV()

  Get the initialization vector for the cipher, or `null` if there is no IV.

  Returns:
    The IV.

### getBlockSize

    public int getBlockSize()

  Get the block size of the cipher these parameters are for.

  Returns:
    The block size.

### getKeySize

    public int getKeySize()

  Get the key size of the cipher these parameters are for.

  Returns:
    The block size.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.