For the latest news and information visit The GNU Crypto project

## gnu.crypto.jce.params
Class BlockCipherParameters

    java.lang.Object
      |
      +--java.security.AlgorithmParametersSpi
            |
            +--gnu.crypto.jce.params.BlockCipherParameters

public class BlockCipherParameters
extends java.security.AlgorithmParametersSpi

An implementation of algorithm parameters for the GNU Crypto block ciphers. This encompasses the cipher's block size, its key size, and an optional initialization vector (IV).

Field Summary
`protected BlockCipherParameterSpec` `cipherSpec` The underlying block cipher specification.

Constructor Summary
`BlockCipherParameters()`

Method Summary
`protected byte[]` `engineGetEncoded()` Return these parameters encoded in ASN.1 (DER).
`protected byte[]` `engineGetEncoded(java.lang.String format)`
`protected java.security.spec.AlgorithmParameterSpec` `engineGetParameterSpec(java.lang.Class c)`
`protected void` `engineInit(java.security.spec.AlgorithmParameterSpec spec)`
`protected void` `engineInit(byte[] encoded)`
`protected void` `engineInit(byte[] encoded, java.lang.String format)`
`protected java.lang.String` `engineToString()`

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

Field Detail

### cipherSpec

    protected BlockCipherParameterSpec cipherSpec

  The underlying block cipher specification.

Constructor Detail

### BlockCipherParameters

    public BlockCipherParameters()

Method Detail

### engineGetEncoded

    protected byte[] engineGetEncoded()
                               throws java.io.IOException

  Return these parameters encoded in ASN.1 (DER).

  For GNU Crypto block ciphers we will define these parameters as

  >     BlockCipherParameters ::= SEQUENCE {
  >        blockSize            INTEGER,
  >        keySize              INTEGER,
  >        initializationVector OCTET STRING OPTIONAL }

  Specified by:
    `engineGetEncoded` in class `java.security.AlgorithmParametersSpi`
  Returns:
    The parameters, encoded an an ASN.1 DER sequence.
  Throws:
    `java.io.IOException` - If encoding these parameters fails.

### engineGetEncoded

    protected byte[] engineGetEncoded(java.lang.String format)
                               throws java.io.IOException

  Specified by:
    `engineGetEncoded` in class `java.security.AlgorithmParametersSpi`
    `java.io.IOException`

### engineInit

    protected void engineInit(java.security.spec.AlgorithmParameterSpec spec)
                       throws java.security.spec.InvalidParameterSpecException

  Specified by:
    `engineInit` in class `java.security.AlgorithmParametersSpi`
    `java.security.spec.InvalidParameterSpecException`

### engineInit

    protected void engineInit(byte[] encoded,
                              java.lang.String format)
                       throws java.io.IOException

  Specified by:
    `engineInit` in class `java.security.AlgorithmParametersSpi`
    `java.io.IOException`

### engineInit

    protected void engineInit(byte[] encoded)
                       throws java.io.IOException

  Specified by:
    `engineInit` in class `java.security.AlgorithmParametersSpi`
    `java.io.IOException`

### engineGetParameterSpec

    protected java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class c)
                                                                        throws java.security.spec.InvalidParameterSpecException

  Specified by:
    `engineGetParameterSpec` in class `java.security.AlgorithmParametersSpi`
    `java.security.spec.InvalidParameterSpecException`

### engineToString

    protected java.lang.String engineToString()

  Specified by:
    `engineToString` in class `java.security.AlgorithmParametersSpi`

For the latest news and information visit The GNU Crypto project

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