Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.crypto.jce.params
Class BlockCipherParameters  view BlockCipherParameters download BlockCipherParameters.java

java.lang.Object
  extended byjava.security.AlgorithmParametersSpi
      extended bygnu.javax.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  gnu.javax.crypto.jce.spec.BlockCipherParameterSpec cipherSpec
          The underlying block cipher specification.
private static java.lang.String DEFAULT_FORMAT
           
 
Constructor Summary
BlockCipherParameters()
           
 
Method Summary
protected  byte[] engineGetEncoded()
          Return these parameters encoded in ASN.1 (DER).
protected  byte[] engineGetEncoded(java.lang.String format)
          Returns the parameters in the specified encoding format.
protected  java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class c)
          Returns a specification of this AlgorithmParameters object.
protected  void engineInit(java.security.spec.AlgorithmParameterSpec spec)
          Initializes the engine with the specified AlgorithmParameterSpec class.
protected  void engineInit(byte[] encoded)
          Initializes the engine with the specified parameters stored in the byte array and decodes them according to the ASN.1 specification.
protected  void engineInit(byte[] encoded, java.lang.String format)
          Initializes the engine with the specified parameters stored in the byte array and decodes them according to the specified decoding specification.
protected  java.lang.String engineToString()
          Returns a string describing the parameters in the AlgorithmParametersSpi class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cipherSpec

protected gnu.javax.crypto.jce.spec.BlockCipherParameterSpec cipherSpec
The underlying block cipher specification.


DEFAULT_FORMAT

private static final java.lang.String DEFAULT_FORMAT
See Also:
Constant Field Values
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 }


engineGetEncoded

protected byte[] engineGetEncoded(java.lang.String format)
                           throws java.io.IOException
Description copied from class: java.security.AlgorithmParametersSpi
Returns the parameters in the specified encoding format. If format is null then the primary encoding format is used, the ASN.1 format, if it exists for the specified type.


engineInit

protected void engineInit(java.security.spec.AlgorithmParameterSpec spec)
                   throws java.security.spec.InvalidParameterSpecException
Description copied from class: java.security.AlgorithmParametersSpi
Initializes the engine with the specified AlgorithmParameterSpec class.


engineInit

protected void engineInit(byte[] encoded,
                          java.lang.String format)
                   throws java.io.IOException
Description copied from class: java.security.AlgorithmParametersSpi
Initializes the engine with the specified parameters stored in the byte array and decodes them according to the specified decoding specification. If format is null, then it is decoded using the ASN.1 specification if it exists or else it throws IOException.


engineInit

protected void engineInit(byte[] encoded)
                   throws java.io.IOException
Description copied from class: java.security.AlgorithmParametersSpi
Initializes the engine with the specified parameters stored in the byte array and decodes them according to the ASN.1 specification. If the ASN.1 specification exists then it succeeds or else it throws IOException.


engineGetParameterSpec

protected java.security.spec.AlgorithmParameterSpec engineGetParameterSpec(java.lang.Class c)
                                                                    throws java.security.spec.InvalidParameterSpecException
Description copied from class: java.security.AlgorithmParametersSpi
Returns a specification of this AlgorithmParameters object. paramSpec identifies the class to return the AlgortihmParameters in.


engineToString

protected java.lang.String engineToString()
Description copied from class: java.security.AlgorithmParametersSpi
Returns a string describing the parameters in the AlgorithmParametersSpi class.