For the latest news and information visit
The GNU Crypto project

gnu.crypto.jce.cipher
Class BlowfishSpi

java.lang.Object
  extended byjavax.crypto.CipherSpi
      extended bygnu.crypto.jce.cipher.CipherAdapter
          extended bygnu.crypto.jce.cipher.BlowfishSpi

public final class BlowfishSpi
extends CipherAdapter

The implementation of the Blowfish Service Provider Interface (SPI) adapter.

Version:
$Revision: 1.2 $

Field Summary
protected  java.util.Map attributes
          Our attributes map.
protected  int blockLen
          The length of blocks we are processing.
protected  IBlockCipher cipher
          Our cipher instance.
protected  int keyLen
          The current key size.
protected  IMode mode
          Our mode instance.
protected  IPad pad
          Our padding instance.
protected  byte[] partBlock
          An incomplete block.
protected  int partLen
          The number of bytes in CipherAdapter.partBlock.
 
Constructor Summary
BlowfishSpi()
           
 
Method Summary
protected  byte[] engineDoFinal(byte[] input, int off, int len)
           
protected  int engineDoFinal(byte[] in, int inOff, int inLen, byte[] out, int outOff)
           
protected  int engineGetBlockSize()
           
protected  byte[] engineGetIV()
           
protected  int engineGetOutputSize(int inputLen)
           
protected  java.security.AlgorithmParameters engineGetParameters()
           
protected  void engineInit(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
           
protected  void engineInit(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random)
           
protected  void engineInit(int opmode, java.security.Key key, java.security.SecureRandom random)
           
protected  void engineSetMode(java.lang.String modeName)
           
protected  void engineSetPadding(java.lang.String padName)
           
protected  byte[] engineUpdate(byte[] input, int off, int len)
           
protected  int engineUpdate(byte[] in, int inOff, int inLen, byte[] out, int outOff)
           
 
Methods inherited from class javax.crypto.CipherSpi
engineGetKeySize, engineUnwrap, engineWrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cipher

protected IBlockCipher cipher
Our cipher instance.


mode

protected IMode mode
Our mode instance.


pad

protected IPad pad
Our padding instance.


keyLen

protected int keyLen
The current key size.


attributes

protected java.util.Map attributes
Our attributes map.


partBlock

protected byte[] partBlock
An incomplete block.


partLen

protected int partLen
The number of bytes in CipherAdapter.partBlock.


blockLen

protected int blockLen
The length of blocks we are processing.

Constructor Detail

BlowfishSpi

public BlowfishSpi()
Method Detail

engineSetMode

protected void engineSetMode(java.lang.String modeName)
                      throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

engineSetPadding

protected void engineSetPadding(java.lang.String padName)
                         throws javax.crypto.NoSuchPaddingException
Throws:
javax.crypto.NoSuchPaddingException

engineGetBlockSize

protected int engineGetBlockSize()

engineGetOutputSize

protected int engineGetOutputSize(int inputLen)

engineGetIV

protected byte[] engineGetIV()

engineGetParameters

protected java.security.AlgorithmParameters engineGetParameters()

engineInit

protected void engineInit(int opmode,
                          java.security.Key key,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException
Throws:
java.security.InvalidKeyException

engineInit

protected void engineInit(int opmode,
                          java.security.Key key,
                          java.security.spec.AlgorithmParameterSpec params,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException,
                          java.security.InvalidAlgorithmParameterException
Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException

engineInit

protected void engineInit(int opmode,
                          java.security.Key key,
                          java.security.AlgorithmParameters params,
                          java.security.SecureRandom random)
                   throws java.security.InvalidKeyException,
                          java.security.InvalidAlgorithmParameterException
Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException

engineUpdate

protected byte[] engineUpdate(byte[] input,
                              int off,
                              int len)

engineUpdate

protected int engineUpdate(byte[] in,
                           int inOff,
                           int inLen,
                           byte[] out,
                           int outOff)
                    throws javax.crypto.ShortBufferException
Throws:
javax.crypto.ShortBufferException

engineDoFinal

protected byte[] engineDoFinal(byte[] input,
                               int off,
                               int len)
                        throws javax.crypto.IllegalBlockSizeException,
                               javax.crypto.BadPaddingException
Throws:
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException

engineDoFinal

protected int engineDoFinal(byte[] in,
                            int inOff,
                            int inLen,
                            byte[] out,
                            int outOff)
                     throws javax.crypto.BadPaddingException,
                            javax.crypto.IllegalBlockSizeException,
                            javax.crypto.ShortBufferException
Throws:
javax.crypto.BadPaddingException
javax.crypto.IllegalBlockSizeException
javax.crypto.ShortBufferException

For the latest news and information visit
The GNU Crypto project

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