aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi_cipher.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-04-07 13:34:52 -0400
committerJack Lloyd <[email protected]>2018-04-07 13:34:52 -0400
commit3657639abf776e78b35a961d646dd410a7fce492 (patch)
treecf969470c7299941f420ac1fc3cde1ba39ab7eb7 /src/lib/ffi/ffi_cipher.cpp
parent7df69ab04ba5f2944ac3135b444c3b103aaa3f80 (diff)
Add RAII versions of get_cipher_mode and get_aead
See also #1526
Diffstat (limited to 'src/lib/ffi/ffi_cipher.cpp')
-rw-r--r--src/lib/ffi/ffi_cipher.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi_cipher.cpp b/src/lib/ffi/ffi_cipher.cpp
index ff73de6fb..871cbd31f 100644
--- a/src/lib/ffi/ffi_cipher.cpp
+++ b/src/lib/ffi/ffi_cipher.cpp
@@ -23,7 +23,7 @@ int botan_cipher_init(botan_cipher_t* cipher, const char* cipher_name, uint32_t
return ffi_guard_thunk(BOTAN_CURRENT_FUNCTION, [=]() -> int {
const bool encrypt_p = ((flags & BOTAN_CIPHER_INIT_FLAG_MASK_DIRECTION) == BOTAN_CIPHER_INIT_FLAG_ENCRYPT);
const Botan::Cipher_Dir dir = encrypt_p ? Botan::ENCRYPTION : Botan::DECRYPTION;
- std::unique_ptr<Botan::Cipher_Mode> mode(Botan::get_cipher_mode(cipher_name, dir));
+ std::unique_ptr<Botan::Cipher_Mode> mode(Botan::Cipher_Mode::create(cipher_name, dir));
if(!mode)
return BOTAN_FFI_ERROR_NOT_IMPLEMENTED;
*cipher = new botan_cipher_struct(mode.release());