// we have password so do encryption
try {
String data = getConfig().xmlText();
String encryptionAlgorithm = "des3";
byte[] encrypted = OpenSSL.encrypt(encryptionAlgorithm, passwordForEncryption.toCharArray(), data.getBytes());
ProjectConfig newProjectConfig = ProjectConfig.Factory.newInstance();
ProjectConfig soapuiProject = projectDocument.getSoapuiProject();
newProjectConfig.setName(soapuiProject.getName());
newProjectConfig.setEncryptedContent(encrypted);
newProjectConfig.setEncryptedContentAlgorithm(encryptionAlgorithm);
return newProjectConfig;
} catch (GeneralSecurityException e) {
UISupport.showErrorMessage("Encryption Error");