This cipher can optionally be added to the J2SSH Maverick API. To add
the ciphers from this package simply add them to the Ssh2Context
using the following code.
import com.sshtools.cipher.*;
SshConnector con = SshConnector.getInstance();
Ssh2Context context = (Ssh2Context)con.getContext(SshConnector.SSH2);
// Add AES
context.supportedCiphers().add(AES128Cbc.AES128_CBC, AES128Cbc.class);
context.supportedCiphers().add(AES192Cbc.AES192_CBC, AES192Cbc.class);
context.supportedCiphers().add(AES256Cbc.AES256_CBC, AES256Cbc.class);
// Add Twofish - note the 256 bit cipher has two different entries to maintain backwards compatibility
context.supportedCiphers().add(Twofish128Cbc.TWOFISH128_CBC, Twofish128Cbc.class);
context.supportedCiphers().add(Twofish192Cbc.TWOFISH192_CBC, Twofish192Cbc.class);
context.supportedCiphers().add(Twofish256Cbc.TWOFISH256_CBC, Twofish256Cbc.class);
context.supportedCiphers().add(Twofish256Cbc.TWOFISH_CBC, Twofish256Cbc.class);
// Add CAST
context.supportedCiphers().add(CAST128Cbc.CAST128_CBC, CAST128Cbc.class);