1 package ch.ethz.ssh2.crypto.cipher; 2 3 9 public class NullCipher implements BlockCipher 10 { 11 private int blockSize = 8; 12 13 public NullCipher() 14 { 15 } 16 17 public NullCipher(int blockSize) 18 { 19 this.blockSize = blockSize; 20 } 21 22 public void init(boolean forEncryption, byte[] key) 23 { 24 } 25 26 public int getBlockSize() 27 { 28 return blockSize; 29 } 30 31 public void transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff) 32 { 33 System.arraycopy(src, srcoff, dst, dstoff, blockSize); 34 } 35 } 36 | Popular Tags |