• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
3  * Please refer to the LICENSE.txt for licensing details.
4  */
5 package ch.ethz.ssh2.crypto.cipher;
6 
7 /**
8  * NullCipher.
9  *
10  * @author Christian Plattner
11  * @version 2.50, 03/15/10
12  */
13 public class NullCipher implements BlockCipher
14 {
15 	private int blockSize = 8;
16 
NullCipher()17 	public NullCipher()
18 	{
19 	}
20 
NullCipher(int blockSize)21 	public NullCipher(int blockSize)
22 	{
23 		this.blockSize = blockSize;
24 	}
25 
init(boolean forEncryption, byte[] key)26 	public void init(boolean forEncryption, byte[] key)
27 	{
28 	}
29 
getBlockSize()30 	public int getBlockSize()
31 	{
32 		return blockSize;
33 	}
34 
transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff)35 	public void transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff)
36 	{
37 		System.arraycopy(src, srcoff, dst, dstoff, blockSize);
38 	}
39 }
40