For the latest news and information visit
The GNU Crypto project

gnu.crypto.jce.params
Class BlockCipherParameters

java.lang.Object
  extended byjava.security.AlgorithmParametersSpi
      extended bygnu.crypto.jce.params.BlockCipherParameters

public class BlockCipherParameters
extends 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).

Version:
$Revision: 1.3 $

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(String format)
           
protected  AlgorithmParameterSpec engineGetParameterSpec(Class c)
           
protected  void engineInit(AlgorithmParameterSpec spec)
           
protected  void engineInit(byte[] encoded)
           
protected  void engineInit(byte[] encoded, String format)
           
protected  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 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 }

Returns:
The parameters, encoded an an ASN.1 DER sequence.
Throws:
IOException - If encoding these parameters fails.

engineGetEncoded

protected byte[] engineGetEncoded(String format)
                           throws IOException
Throws:
IOException

engineInit

protected void engineInit(AlgorithmParameterSpec spec)
                   throws InvalidParameterSpecException
Throws:
InvalidParameterSpecException

engineInit

protected void engineInit(byte[] encoded,
                          String format)
                   throws IOException
Throws:
IOException

engineInit

protected void engineInit(byte[] encoded)
                   throws IOException
Throws:
IOException

engineGetParameterSpec

protected AlgorithmParameterSpec engineGetParameterSpec(Class c)
                                                 throws InvalidParameterSpecException
Throws:
InvalidParameterSpecException

engineToString

protected String engineToString()

For the latest news and information visit
The GNU Crypto project

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