String keyAlias = blobUri.getEncryptionKey();
if (keyAlias != null)
{
// currently we only support AES encryption, use by default
EncryptionHandler eh = new AESEncryptionHandler();
try {
logger.debug("Decrypting object {} with key {}", uri, keyAlias);
byte[] iv = getCipherIVFromBlobName(BlobUtils.relativize(uri.getPath()));
in = eh.decrypt(CloudStoreProxy.read(uri),
Configurator.getEncryptionKey(keyAlias), iv);
} catch (GeneralSecurityException gse) {
throw new IOException("Unable to decrypt message blob: ", gse);
}
} else {