0
|
1 package com.trilead.ssh2.crypto.cipher;
|
|
2
|
|
3 /**
|
|
4 * NullCipher.
|
|
5 *
|
|
6 * @author Christian Plattner, plattner@trilead.com
|
|
7 * @version $Id: NullCipher.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
|
|
8 */
|
|
9 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, int dstoff) {
|
|
27 System.arraycopy(src, srcoff, dst, dstoff, blockSize);
|
|
28 }
|
|
29 }
|