org.bouncycastle.crypto.engines

Class NullEngine

Implemented Interfaces:
BlockCipher

public class NullEngine
extends java.lang.Object
implements BlockCipher

The no-op engine that just copies bytes through, irrespective of whether encrypting and decrypting. Provided for the sake of completeness.

Field Summary

protected static int
BLOCK_SIZE

Constructor Summary

NullEngine()
Standard constructor.

Method Summary

String
getAlgorithmName()
int
getBlockSize()
void
init(boolean forEncryption, CipherParameters params)
int
processBlock(byte[] in, int inOff, byte[] out, int outOff)
void
reset()

Field Details

BLOCK_SIZE

protected static final int BLOCK_SIZE

Field Value:
1

Constructor Details

NullEngine

public NullEngine()
Standard constructor.

Method Details

getAlgorithmName

public String getAlgorithmName()
Specified by:
getAlgorithmName in interface BlockCipher


getBlockSize

public int getBlockSize()
Specified by:
getBlockSize in interface BlockCipher


init

public void init(boolean forEncryption,
                 CipherParameters params)
            throws IllegalArgumentException
Specified by:
init in interface BlockCipher


processBlock

public int processBlock(byte[] in,
                        int inOff,
                        byte[] out,
                        int outOff)
            throws DataLengthException,
                   IllegalStateException
Specified by:
processBlock in interface BlockCipher


reset

public void reset()
Specified by:
reset in interface BlockCipher