Logo Search packages:      
Sourcecode: libgnucrypto-java version File versions  Download package

gnu::crypto::jce::cipher::CipherAdapter Class Reference

Inheritance diagram for gnu::crypto::jce::cipher::CipherAdapter:

javax::crypto::CipherSpi gnu::crypto::jce::cipher::AESSpi gnu::crypto::jce::cipher::AnubisSpi gnu::crypto::jce::cipher::BlowfishSpi gnu::crypto::jce::cipher::Cast5Spi gnu::crypto::jce::cipher::DESSpi gnu::crypto::jce::cipher::KhazadSpi gnu::crypto::jce::cipher::NullCipherSpi gnu::crypto::jce::cipher::PBES2 gnu::crypto::jce::cipher::RijndaelSpi gnu::crypto::jce::cipher::SerpentSpi gnu::crypto::jce::cipher::SquareSpi gnu::crypto::jce::cipher::TripleDESSpi gnu::crypto::jce::cipher::TwofishSpi

List of all members.


Detailed Description

The implementation of a generic Cipher Adapter class to wrap GNU Crypto cipher instances.

This class defines the Service Provider Interface (SPI) for the Cipher class, which provides the functionality of symmetric-key block ciphers, such as the AES.

This base class defines all of the abstract methods in CipherSpi, but does not define the (non-abstract) key wrapping functions that extended the base cipher SPI, and these methods thus immediately throw an UnsupportedOperationException. If a cipher implementation provides this functionality, or if it in fact accepts parameters other than the key and the initialization vector, the subclass should override those methods. Otherwise a subclass need only call the CipherAdapter(String) constructor with the name of the cipher.

Version:
Revision
1.3

Definition at line 94 of file CipherAdapter.java.


Protected Member Functions

 CipherAdapter (String cipherName)
 CipherAdapter (String cipherName, int blockLen)
int engineDoFinal (byte[] in, int inOff, int inLen, byte[] out, int outOff) throws BadPaddingException, IllegalBlockSizeException, ShortBufferException
byte[] engineDoFinal (byte[] input, int off, int len) throws IllegalBlockSizeException, BadPaddingException
int engineGetBlockSize ()
byte[] engineGetIV ()
int engineGetKeySize (Key key) throws InvalidKeyException
int engineGetOutputSize (int inputLen)
AlgorithmParameters engineGetParameters ()
void engineInit (int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
void engineInit (int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
void engineInit (int opmode, Key key, SecureRandom random) throws InvalidKeyException
void engineSetMode (String modeName) throws NoSuchAlgorithmException
void engineSetPadding (String padName) throws NoSuchPaddingException
java.security.Key engineUnwrap (byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException
int engineUpdate (byte[] in, int inOff, int inLen, byte[] out, int outOff) throws ShortBufferException
byte[] engineUpdate (byte[] input, int off, int len)
byte[] engineWrap (Key key) throws IllegalBlockSizeException, InvalidKeyException

Protected Attributes

Map attributes
int blockLen
IBlockCipher cipher
int keyLen
IMode mode
IPad pad
byte[] partBlock
int partLen

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index