comparison src/ch/ethz/ssh2/crypto/cipher/NullCipher.java @ 308:42b15aaa7ac7 ganymed

merge
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:21:50 -0700
parents 071eccdff8ea
children
comparison
equal deleted inserted replaced
306:90e47d99ea54 308:42b15aaa7ac7
4 */ 4 */
5 package ch.ethz.ssh2.crypto.cipher; 5 package ch.ethz.ssh2.crypto.cipher;
6 6
7 /** 7 /**
8 * NullCipher. 8 * NullCipher.
9 * 9 *
10 * @author Christian Plattner 10 * @author Christian Plattner
11 * @version 2.50, 03/15/10 11 * @version 2.50, 03/15/10
12 */ 12 */
13 public class NullCipher implements BlockCipher 13 public class NullCipher implements BlockCipher {
14 { 14 private int blockSize = 8;
15 private int blockSize = 8;
16
17 public NullCipher()
18 {
19 }
20 15
21 public NullCipher(int blockSize) 16 public NullCipher() {
22 { 17 }
23 this.blockSize = blockSize;
24 }
25
26 public void init(boolean forEncryption, byte[] key)
27 {
28 }
29 18
30 public int getBlockSize() 19 public NullCipher(int blockSize) {
31 { 20 this.blockSize = blockSize;
32 return blockSize; 21 }
33 }
34 22
35 public void transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff) 23 public void init(boolean forEncryption, byte[] key) {
36 { 24 }
37 System.arraycopy(src, srcoff, dst, dstoff, blockSize); 25
38 } 26 public int getBlockSize() {
27 return blockSize;
28 }
29
30 public void transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff) {
31 System.arraycopy(src, srcoff, dst, dstoff, blockSize);
32 }
39 } 33 }