aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi_mac.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_mac.cpp
parent9b379f6bcdd7fbe688013a1d76f863ef24caec39 (diff)
Add FFI funcs to get algo name from cipher, MAC and hash objs
Diffstat (limited to 'src/lib/ffi/ffi_mac.cpp')
-rw-r--r--src/lib/ffi/ffi_mac.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/ffi/ffi_mac.cpp b/src/lib/ffi/ffi_mac.cpp
index 22dbb2513..02ac7900c 100644
--- a/src/lib/ffi/ffi_mac.cpp
+++ b/src/lib/ffi/ffi_mac.cpp
@@ -61,4 +61,10 @@ int botan_mac_final(botan_mac_t mac, uint8_t out[])
return BOTAN_FFI_DO(Botan::MessageAuthenticationCode, mac, m, { m.final(out); });
}
+int botan_mac_name(botan_mac_t mac, char* name, size_t* name_len)
+ {
+ return BOTAN_FFI_DO(Botan::MessageAuthenticationCode, mac, m, {
+ return write_str_output(name, name_len, m.name()); });
+ }
+
}