* @return A decrypted Properies object with all of the properties from the
* CentraView Customer server.
*/
private static final Key decryptBlowfishKey(byte[] encryptedKey)
{
SecretKeySpec blowfishKey = null;
try {
X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(PUBLIC_KEY);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
RSAPublicKey publicKey = (RSAPublicKey)keyFactory.generatePublic(publicKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, publicKey);
byte[] blowfishKeyByteArray = cipher.doFinal(encryptedKey);
blowfishKey = new SecretKeySpec(blowfishKeyByteArray, "Blowfish");
} catch (Exception exception) {
logger.error("[decryptBlowfishKey] Exception thrown.", exception);
}
return blowfishKey;
} //end of decryptServerProperties method