au.net.aba.crypto.provider
Class IDEA

java.lang.Object
  |
  +--javax.crypto.CipherSpi
        |
        +--au.net.aba.crypto.provider.BlockCipher
              |
              +--au.net.aba.crypto.provider.IDEA

public class IDEA
extends BlockCipher

A class that provides IDEA public key encryption operations, such as encoding data and generating keys.


Field Summary
 int[] decr
           
 int[] encr
          The data bytes that constitute the key.
static java.lang.String ident
           
protected static int KeyLen
           
protected static int MulMask
           
protected static int MulModulus
           
protected static int Rounds
           
protected static int UserKeyLen
           
 
Fields inherited from class au.net.aba.crypto.provider.BlockCipher
BLOCK_SIZE, buffer, bufferPos, CBC, cbcV, ECB, firstBlock, ident, ivec, ivEncrypted, ivInline, key, mode, paddedStream, random, streamMode
 
Fields inherited from class javax.crypto.CipherSpi
ident
 
Constructor Summary
IDEA()
           
 
Method Summary
protected  int decryptBlock(byte[] src, int srcIndex, int len, byte[] dst, int dstIndex)
          Decrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset.
protected  int encryptBlock(byte[] src, int srcIndex, int len, byte[] dst, int dstIndex)
          Encrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset.
protected  void setKey(java.security.Key inKey)
          Re-key the cipher.
 
Methods inherited from class au.net.aba.crypto.provider.BlockCipher
engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUpdate, engineUpdate, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ident

public static final java.lang.String ident

Rounds

protected static final int Rounds

UserKeyLen

protected static final int UserKeyLen

KeyLen

protected static final int KeyLen

MulModulus

protected static final int MulModulus

MulMask

protected static final int MulMask

encr

public int[] encr
The data bytes that constitute the key.

decr

public int[] decr
Constructor Detail

IDEA

public IDEA()
Method Detail

setKey

protected void setKey(java.security.Key inKey)
               throws java.security.InvalidKeyException
Re-key the cipher. If the provided Key is not compatible with this cipher the exception should throw an InvalidKeyException.
Parameters:
inKey - the key to be used.
Throws:
java.security.InvalidKeyException - if the key is of the wrong type.
Overrides:
setKey in class BlockCipher

encryptBlock

protected int encryptBlock(byte[] src,
                           int srcIndex,
                           int len,
                           byte[] dst,
                           int dstIndex)
                    throws IllegalBlockSizeException
Encrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset. The input will be an exact multiple of our blocksize.
Overrides:
encryptBlock in class BlockCipher

decryptBlock

protected int decryptBlock(byte[] src,
                           int srcIndex,
                           int len,
                           byte[] dst,
                           int dstIndex)
                    throws BadPaddingException
Decrypt the given input starting at the given offset and place the result in the provided buffer starting at the given offset. The input will be an exact multiple of our blocksize.
Overrides:
decryptBlock in class BlockCipher