decryptedData = keyVersion.getDecryptingCipher().doFinal(materialToDecrypt);
// Catch all exceptions
} catch (Exception e) {
// propagate the exception up as an decrypted exception
throw new DecryptionException("Decryption of byte array failed", e);
}
// return the decrypted data
return decryptedData;
}