|
13 | 13 | * @author Christian Plattner, plattner@trilead.com
|
14 | 14 | * @version $Id: CryptoWishList.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
|
15 | 15 | */
|
16 |
| -public class CryptoWishList |
| 16 | +public class CryptoWishList implements Cloneable |
17 | 17 | {
|
18 |
| - public String[] kexAlgorithms = KexManager.getDefaultKexAlgorithmList(); |
19 |
| - public String[] serverHostKeyAlgorithms = KexManager.getDefaultServerHostkeyAlgorithmList(); |
20 |
| - public String[] c2s_enc_algos = BlockCipherFactory.getDefaultCipherList(); |
21 |
| - public String[] s2c_enc_algos = BlockCipherFactory.getDefaultCipherList(); |
22 |
| - public String[] c2s_mac_algos = MACs.getMacList(); |
23 |
| - public String[] s2c_mac_algos = MACs.getMacList(); |
24 |
| - public String[] c2s_comp_algos = CompressionFactory.getDefaultCompressorList(); |
25 |
| - public String[] s2c_comp_algos = CompressionFactory.getDefaultCompressorList(); |
| 18 | + public CryptoWishList() { |
| 19 | + kexAlgorithms = KexManager.getDefaultKexAlgorithmList(); |
| 20 | + serverHostKeyAlgorithms = KexManager.getDefaultServerHostkeyAlgorithmList(); |
| 21 | + c2s_enc_algos = BlockCipherFactory.getDefaultCipherList(); |
| 22 | + s2c_enc_algos = BlockCipherFactory.getDefaultCipherList(); |
| 23 | + c2s_mac_algos = MACs.getMacList(); |
| 24 | + s2c_mac_algos = MACs.getMacList(); |
| 25 | + c2s_comp_algos = CompressionFactory.getDefaultCompressorList(); |
| 26 | + s2c_comp_algos = CompressionFactory.getDefaultCompressorList(); |
| 27 | + } |
| 28 | + |
| 29 | + public CryptoWishList(CryptoWishList other) { |
| 30 | + kexAlgorithms = other.kexAlgorithms.clone(); |
| 31 | + serverHostKeyAlgorithms = other.serverHostKeyAlgorithms.clone(); |
| 32 | + c2s_enc_algos = other.c2s_enc_algos.clone(); |
| 33 | + s2c_enc_algos = other.s2c_enc_algos.clone(); |
| 34 | + c2s_mac_algos = other.c2s_mac_algos.clone(); |
| 35 | + s2c_mac_algos = other.s2c_mac_algos.clone(); |
| 36 | + c2s_comp_algos = other.c2s_comp_algos.clone(); |
| 37 | + s2c_comp_algos = other.s2c_comp_algos.clone(); |
| 38 | + } |
| 39 | + |
| 40 | + public String[] kexAlgorithms; |
| 41 | + public String[] serverHostKeyAlgorithms; |
| 42 | + public String[] c2s_enc_algos; |
| 43 | + public String[] s2c_enc_algos; |
| 44 | + public String[] c2s_mac_algos; |
| 45 | + public String[] s2c_mac_algos; |
| 46 | + public String[] c2s_comp_algos; |
| 47 | + public String[] s2c_comp_algos; |
| 48 | + |
| 49 | + @Override |
| 50 | + public CryptoWishList clone() { |
| 51 | + return new CryptoWishList(this); |
| 52 | + } |
26 | 53 | }
|
0 commit comments