void CryptoProxy::decrypt(const ByteVector& keyMaterial, const ByteVector& iv, const ByteVector& data, ByteVector& decryptedData) { CryptoKey* key = createKey(keyMaterial, iv); try { decrypt(key, data, decryptedData); } catch (exception&) { destroyKey(key); throw; } destroyKey(key); }
AES_ECB::~AES_ECB() { if(destroyKey()) { //throw expection } }