consoleReader.printString(DeployUtils.reformat("String to encrypt: "+commandArgs.getArgs()[0], 4, 72));
DeploymentManager dm = connection.getDeploymentManager();
if (dm instanceof RemoteDeploymentManager) {
// Online encryption
Kernel k = ((RemoteDeploymentManager)dm).getKernel();
Object ret = k.invoke(ConfiguredEncryption.class, "encrypt", new Object[] {commandArgs.getArgs()[0]}, new String[] {"java.lang.String"});
consoleReader.printString(DeployUtils.reformat("Online encryption result: "+ret, 4, 72));
} else {
// Offline encryption
Object ret = EncryptionManager.encrypt(commandArgs.getArgs()[0]);
consoleReader.printString(DeployUtils.reformat("Offline encryption result: "+ret, 4, 72));