aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/ecies/ecies.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/ecies/ecies.cpp')
-rw-r--r--src/lib/pubkey/ecies/ecies.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/pubkey/ecies/ecies.cpp b/src/lib/pubkey/ecies/ecies.cpp
index 8bc4e2600..793cca225 100644
--- a/src/lib/pubkey/ecies/ecies.cpp
+++ b/src/lib/pubkey/ecies/ecies.cpp
@@ -221,12 +221,7 @@ std::unique_ptr<MessageAuthenticationCode> ECIES_System_Params::create_mac() con
std::unique_ptr<Cipher_Mode> ECIES_System_Params::create_cipher(Botan::Cipher_Dir direction) const
{
- Cipher_Mode* cipher = get_cipher_mode(m_dem_spec, direction);
- if(cipher == nullptr)
- {
- throw Algorithm_Not_Found(m_dem_spec);
- }
- return std::unique_ptr<Cipher_Mode>(cipher);
+ return Cipher_Mode::create_or_throw(m_dem_spec, direction);
}