com.mindbright.jce.crypto
Class Cipher

java.lang.Object
  extended bycom.mindbright.jce.crypto.Cipher

public class Cipher
extends java.lang.Object


Field Summary
static int DECRYPT_MODE
           
static int ENCRYPT_MODE
           
 
Constructor Summary
protected Cipher(CipherSpi cipherSpi, Provider provider, java.lang.String transformation)
           
 
Method Summary
 byte[] doFinal(byte[] input)
           
 byte[] doFinal(byte[] input, int inputOffset, int inputLen)
           
 int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output)
           
 int doFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
           
 java.lang.String getAlgorithm()
           
 int getBlockSize()
           
static Cipher getInstance(java.lang.String transformation)
           
static Cipher getInstance(java.lang.String transformation, java.lang.String provider)
           
 byte[] getIV()
           
 int getOutputSize(int inputLen)
           
 Provider getProvider()
           
 void init(int opmode, Key key)
           
 void init(int opmode, Key key, AlgorithmParameterSpec params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DECRYPT_MODE

public static final int DECRYPT_MODE
See Also:
Constant Field Values

ENCRYPT_MODE

public static final int ENCRYPT_MODE
See Also:
Constant Field Values
Constructor Detail

Cipher

protected Cipher(CipherSpi cipherSpi,
                 Provider provider,
                 java.lang.String transformation)
Method Detail

doFinal

public final byte[] doFinal(byte[] input)

doFinal

public final byte[] doFinal(byte[] input,
                            int inputOffset,
                            int inputLen)

doFinal

public final int doFinal(byte[] input,
                         int inputOffset,
                         int inputLen,
                         byte[] output)

doFinal

public final int doFinal(byte[] input,
                         int inputOffset,
                         int inputLen,
                         byte[] output,
                         int outputOffset)

getAlgorithm

public final java.lang.String getAlgorithm()

getBlockSize

public final int getBlockSize()

getInstance

public static final Cipher getInstance(java.lang.String transformation)
                                throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

getInstance

public static final Cipher getInstance(java.lang.String transformation,
                                       java.lang.String provider)
                                throws NoSuchAlgorithmException,
                                       NoSuchProviderException
Throws:
NoSuchAlgorithmException
NoSuchProviderException

getIV

public final byte[] getIV()

getOutputSize

public final int getOutputSize(int inputLen)

getProvider

public final Provider getProvider()

init

public final void init(int opmode,
                       Key key)
                throws InvalidKeyException
Throws:
InvalidKeyException

init

public final void init(int opmode,
                       Key key,
                       AlgorithmParameterSpec params)
                throws InvalidKeyException
Throws:
InvalidKeyException