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

Quick Search    Search Deep

cryptix.jce.provider.cipher
Class Null  view Null download Null.java

java.lang.Object
  extended byjavax.crypto.CipherSpi
      extended bycryptix.jce.provider.cipher.Null

public final class Null
extends javax.crypto.CipherSpi

Null cipher (identity transformation).

Version:
$Revision: 1.6 $

Field Summary
private static int BLOCK_SIZE
          The block size of this cipher.
 
Constructor Summary
Null()
           
 
Method Summary
 java.lang.Object clone()
          Always throws a CloneNotSupportedException (cloning of ciphers is not supported for security reasons).
protected  byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
          Finishes a multi-part transformation or transforms a portion of a byte array, and returns the transformed bytes.
protected  int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
          Finishes a multi-part transformation or transforms a portion of a byte array, and stores the transformed bytes in the supplied array.
 int engineGetBlockSize()
          Returns the length of an input block, in bytes.
protected  byte[] engineGetIV()
          We don't use IVs.
protected  int engineGetOutputSize(int inputLen)
          Return output size given input length.
protected  java.security.AlgorithmParameters engineGetParameters()
          Returns the parameters that this cipher is using.
protected  void engineInit(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec params, java.security.SecureRandom random)
          Initializes this cipher with an operation mode, key, parameters, and source of randomness.
protected  void engineInit(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random)
          Initializes this cipher with an operation mode, key, parameters, and source of randomness.
protected  void engineInit(int opmode, java.security.Key key, java.security.SecureRandom random)
          Initializes this cipher with an operation mode, key, and source of randomness.
protected  void engineSetMode(java.lang.String mode)
          Set the mode in which this cipher is to run.
protected  void engineSetPadding(java.lang.String padding)
          Set the method with which the input is to be padded.
protected  byte[] engineUpdate(byte[] input, int inputOffset, int inputLen)
          Continue with a multi-part transformation, returning a new array of the transformed bytes.
protected  int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
          Continue with a multi-part transformation, storing the transformed bytes into the specified array.
private  int internalUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
           
 
Methods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineGetKeySize, engineUnwrap, engineUpdate, engineWrap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_SIZE

private static final int BLOCK_SIZE
The block size of this cipher. Being a stream cipher this value is 1!

See Also:
Constant Field Values
Constructor Detail

Null

public Null()
Method Detail

clone

public final java.lang.Object clone()
                             throws java.lang.CloneNotSupportedException
Always throws a CloneNotSupportedException (cloning of ciphers is not supported for security reasons).


engineSetMode

protected final void engineSetMode(java.lang.String mode)
                            throws java.security.NoSuchAlgorithmException
Description copied from class: javax.crypto.CipherSpi
Set the mode in which this cipher is to run.


engineSetPadding

protected final void engineSetPadding(java.lang.String padding)
                               throws javax.crypto.NoSuchPaddingException
Description copied from class: javax.crypto.CipherSpi
Set the method with which the input is to be padded.


engineGetBlockSize

public int engineGetBlockSize()
Returns the length of an input block, in bytes.


engineGetOutputSize

protected final int engineGetOutputSize(int inputLen)
Return output size given input length. We don't buffer so this method always returns inputLen.


engineGetIV

protected final byte[] engineGetIV()
We don't use IVs. FIXME: maybe return whatever was set?


engineGetParameters

protected final java.security.AlgorithmParameters engineGetParameters()
Description copied from class: javax.crypto.CipherSpi
Returns the parameters that this cipher is using. This may be the parameters used to initialize this cipher, or it may be parameters that have been initialized with random values.


engineInit

protected final void engineInit(int opmode,
                                java.security.Key key,
                                java.security.SecureRandom random)
                         throws java.security.InvalidKeyException
Description copied from class: javax.crypto.CipherSpi
Initializes this cipher with an operation mode, key, and source of randomness. If this cipher requires any other initializing data, for example an initialization vector, then it should generate it from the provided source of randomness.


engineInit

protected final void engineInit(int opmode,
                                java.security.Key key,
                                java.security.spec.AlgorithmParameterSpec params,
                                java.security.SecureRandom random)
                         throws java.security.InvalidKeyException,
                                java.security.InvalidAlgorithmParameterException
Description copied from class: javax.crypto.CipherSpi
Initializes this cipher with an operation mode, key, parameters, and source of randomness. If this cipher requires any other initializing data, for example an initialization vector, then it should generate it from the provided source of randomness.


engineInit

protected final void engineInit(int opmode,
                                java.security.Key key,
                                java.security.AlgorithmParameters params,
                                java.security.SecureRandom random)
                         throws java.security.InvalidKeyException,
                                java.security.InvalidAlgorithmParameterException
Description copied from class: javax.crypto.CipherSpi
Initializes this cipher with an operation mode, key, parameters, and source of randomness. If this cipher requires any other initializing data, for example an initialization vector, then it should generate it from the provided source of randomness.


engineUpdate

protected final int engineUpdate(byte[] input,
                                 int inputOffset,
                                 int inputLen,
                                 byte[] output,
                                 int outputOffset)
                          throws javax.crypto.ShortBufferException
Description copied from class: javax.crypto.CipherSpi
Continue with a multi-part transformation, storing the transformed bytes into the specified array.


engineUpdate

protected final byte[] engineUpdate(byte[] input,
                                    int inputOffset,
                                    int inputLen)
Description copied from class: javax.crypto.CipherSpi
Continue with a multi-part transformation, returning a new array of the transformed bytes.


engineDoFinal

protected final int engineDoFinal(byte[] input,
                                  int inputOffset,
                                  int inputLen,
                                  byte[] output,
                                  int outputOffset)
                           throws javax.crypto.ShortBufferException,
                                  javax.crypto.IllegalBlockSizeException,
                                  javax.crypto.BadPaddingException
Description copied from class: javax.crypto.CipherSpi
Finishes a multi-part transformation or transforms a portion of a byte array, and stores the transformed bytes in the supplied array.


engineDoFinal

protected final byte[] engineDoFinal(byte[] input,
                                     int inputOffset,
                                     int inputLen)
                              throws javax.crypto.IllegalBlockSizeException,
                                     javax.crypto.BadPaddingException
Description copied from class: javax.crypto.CipherSpi
Finishes a multi-part transformation or transforms a portion of a byte array, and returns the transformed bytes.


internalUpdate

private final int internalUpdate(byte[] input,
                                 int inputOffset,
                                 int inputLen,
                                 byte[] output,
                                 int outputOffset)