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

Quick Search    Search Deep

javax.crypto
Class NullCipherImpl  view NullCipherImpl download NullCipherImpl.java

java.lang.Object
  extended byjavax.crypto.CipherSpi
      extended byjavax.crypto.NullCipherImpl

final class NullCipherImpl
extends CipherSpi

Implementation of the identity cipher.


Constructor Summary
(package private) NullCipherImpl()
           
 
Method Summary
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.
protected  int engineGetBlockSize()
          Returns the block size of the underlying cipher.
protected  byte[] engineGetIV()
          Returns the initializaiton vector this cipher was initialized with, if any.
protected  int engineGetOutputSize(int inputLen)
          Returns the size, in bytes, an output buffer must be for a call to engineUpdate(byte[],int,int,byte[],int) 55 or engineDoFinal(byte[],int,int,byte[],int) 55 to succeed.
protected  java.security.AlgorithmParameters engineGetParameters()
          Returns the parameters that this cipher is using.
protected  void engineInit(int mode, java.security.Key key, java.security.spec.AlgorithmParameterSpec spec, java.security.SecureRandom random)
          Initializes this cipher with an operation mode, key, parameters, and source of randomness.
protected  void engineInit(int mode, 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 mode, 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.
 
Methods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineGetKeySize, engineUnwrap, engineUpdate, engineWrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullCipherImpl

NullCipherImpl()
Method Detail

engineSetMode

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

Specified by:
engineSetMode in class CipherSpi

engineSetPadding

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

Specified by:
engineSetPadding in class CipherSpi

engineGetBlockSize

protected int engineGetBlockSize()
Description copied from class: CipherSpi
Returns the block size of the underlying cipher.

Specified by:
engineGetBlockSize in class CipherSpi

engineGetOutputSize

protected int engineGetOutputSize(int inputLen)
Description copied from class: CipherSpi

Returns the size, in bytes, an output buffer must be for a call to CipherSpi.engineUpdate(byte[],int,int,byte[],int) 55 or CipherSpi.engineDoFinal(byte[],int,int,byte[],int) 55 to succeed.

The actual output length may be smaller than the value returned by this method, as it considers the padding length as well. The length considered is the argument plus the length of any buffered, unprocessed bytes.

Specified by:
engineGetOutputSize in class CipherSpi

engineGetIV

protected byte[] engineGetIV()
Description copied from class: CipherSpi
Returns the initializaiton vector this cipher was initialized with, if any.

Specified by:
engineGetIV in class CipherSpi

engineGetParameters

protected java.security.AlgorithmParameters engineGetParameters()
Description copied from class: 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.

Specified by:
engineGetParameters in class CipherSpi

engineInit

protected void engineInit(int mode,
                          java.security.Key key,
                          java.security.SecureRandom random)
Description copied from class: 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.

Specified by:
engineInit in class CipherSpi

engineInit

protected void engineInit(int mode,
                          java.security.Key key,
                          java.security.spec.AlgorithmParameterSpec spec,
                          java.security.SecureRandom random)
Description copied from class: 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.

Specified by:
engineInit in class CipherSpi

engineInit

protected void engineInit(int mode,
                          java.security.Key key,
                          java.security.AlgorithmParameters params,
                          java.security.SecureRandom random)
Description copied from class: 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.

Specified by:
engineInit in class CipherSpi

engineUpdate

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

Specified by:
engineUpdate in class CipherSpi

engineUpdate

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

Specified by:
engineUpdate in class CipherSpi

engineDoFinal

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

Specified by:
engineDoFinal in class CipherSpi

engineDoFinal

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

Specified by:
engineDoFinal in class CipherSpi