aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi_cipher.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-07-19 20:12:14 -0400
committerJack Lloyd <[email protected]>2018-07-19 20:12:14 -0400
commit381ee690999318a86fa61a0ac54416230b5567da (patch)
tree0793d4c04458402cf2a6ce0d929b31d71501883d /src/lib/ffi/ffi_cipher.cpp
parent9b379f6bcdd7fbe688013a1d76f863ef24caec39 (diff)
Add FFI funcs to get algo name from cipher, MAC and hash objs
Diffstat (limited to 'src/lib/ffi/ffi_cipher.cpp')
-rw-r--r--src/lib/ffi/ffi_cipher.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/ffi/ffi_cipher.cpp b/src/lib/ffi/ffi_cipher.cpp
index 871cbd31f..094656fd2 100644
--- a/src/lib/ffi/ffi_cipher.cpp
+++ b/src/lib/ffi/ffi_cipher.cpp
@@ -193,4 +193,10 @@ int botan_cipher_get_tag_length(botan_cipher_t cipher, size_t* tl)
return BOTAN_FFI_DO(Botan::Cipher_Mode, cipher, c, { *tl = c.tag_size(); });
}
+int botan_cipher_name(botan_cipher_t cipher, char* name, size_t* name_len)
+ {
+ return BOTAN_FFI_DO(Botan::Cipher_Mode, cipher, c, {
+ return write_str_output(name, name_len, c.name()); });
+ }
+
}