01: package ch.ethz.ssh2.crypto.cipher;
02:
03: /**
04: * NullCipher.
05: *
06: * @author Christian Plattner, plattner@inf.ethz.ch
07: * @version $Id: NullCipher.java,v 1.3 2005/12/07 10:25:48 cplattne Exp $
08: */
09: public class NullCipher implements BlockCipher {
10: private int blockSize = 8;
11:
12: public NullCipher() {
13: }
14:
15: public NullCipher(int blockSize) {
16: this .blockSize = blockSize;
17: }
18:
19: public void init(boolean forEncryption, byte[] key) {
20: }
21:
22: public int getBlockSize() {
23: return blockSize;
24: }
25:
26: public void transformBlock(byte[] src, int srcoff, byte[] dst,
27: int dstoff) {
28: System.arraycopy(src, srcoff, dst, dstoff, blockSize);
29: }
30: }
|