Knowledgebase
Using AES cipher in Java components
Posted by Van Glass on 13 May 2009 02:58 AM
The AES cipher is not supported by default in JSCAPE components for Java. Also, this is a restricted cipher that is not supported by the default Java installation. To use AES ciphers you must perform the following:

1. Download and install Unlimited Jurisdiction Policy Files provided by Sun. http://java.sun.com

2. Set your code to add support for AES ciphers as follows:

SshConfiguration configuration = new SshConfiguration();
configuration.getTransportConfiguration().getAlgorithmFactory().addCipher("aes128-cbc", "AES/CBC/NoPadding", 16);
configuration.getTransportConfiguration().getAlgorithmFactory().addCipher("aes192-cbc", "AES/CBC/NoPadding", 24);
configuration.getTransportConfiguration().getAlgorithmFactory().addCipher("aes256-cbc", "AES/CBC/NoPadding", 32);


// for SFTP connections
Sftp sftp = new Sftp(params,configuration);
sftp.connect();

// for SSH connections
Ssh ssh = new Ssh(params,configuration);
ssh.connect();
(143 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako fusion