byte[] returnByteArray = null;
try {
byte[] zeros = new byte[8];
Arrays.fill(zeros, (byte)0);
IvParameterSpec ivSpec = new IvParameterSpec(zeros);
ByteArrayOutputStream byteArrayOutStream = new ByteArrayOutputStream();
serverProperties.store(byteArrayOutStream, "CentraView Server Properties");
Cipher cipher = Cipher.getInstance("Blowfish/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, blowfishKey, ivSpec);
returnByteArray = cipher.doFinal(byteArrayOutStream.toByteArray());
} catch (Exception exception) {
logger.error("[encryptServerData] Exception thrown.", exception);
}
return returnByteArray;
} //end of encryptServerData method