* @return A decrypted Properies object with all of the properties from the
* CentraView Customer server.
*/
private static final Properties decryptLicenseFile(Key blowfishKey, byte[] licenseFile)
{
Properties returnProperties = null;
try {
byte[] zeros = new byte[8];
Arrays.fill(zeros, (byte)0);
IvParameterSpec ivSpec = new IvParameterSpec(zeros);
Cipher cipher = Cipher.getInstance("Blowfish/CBC/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, blowfishKey, ivSpec);
ByteArrayInputStream byteArrayInStream = new ByteArrayInputStream(cipher.doFinal(licenseFile));
returnProperties = new Properties();
returnProperties.load(byteArrayInStream);
} catch (Exception exception) {
logger.error("decryptLicenseFile: generic Exception", exception);
}
return returnProperties;
} //end of decryptLicenseFile method