aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/mac.h
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-06-03 16:08:02 +0200
committerHans Nilsson <[email protected]>2019-06-14 13:33:07 +0200
commitde310ac450cf452b57150ea3abd65b74942d94fd (patch)
tree9a2e7fc48b9cf1ce0d6de4dc001df1fe56838026 /lib/crypto/c_src/mac.h
parent45fe2d9fa1f9997bbdf6f50ef721f42204c812f0 (diff)
downloadotp-de310ac450cf452b57150ea3abd65b74942d94fd.tar.gz
otp-de310ac450cf452b57150ea3abd65b74942d94fd.tar.bz2
otp-de310ac450cf452b57150ea3abd65b74942d94fd.zip
crypto: Implement NIFs for the new mac_init, mac_update and mac_final
Use them for old HMAC functions. Also simplify hmac and cmac on the Erlang level
Diffstat (limited to 'lib/crypto/c_src/mac.h')
-rw-r--r--lib/crypto/c_src/mac.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/crypto/c_src/mac.h b/lib/crypto/c_src/mac.h
index 00b94a2232..053a331324 100644
--- a/lib/crypto/c_src/mac.h
+++ b/lib/crypto/c_src/mac.h
@@ -23,6 +23,7 @@
#include "common.h"
+int init_mac_ctx(ErlNifEnv *env);
void init_mac_types(ErlNifEnv* env);
@@ -30,4 +31,8 @@ ERL_NIF_TERM mac_types_as_list(ErlNifEnv* env);
ERL_NIF_TERM mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ERL_NIF_TERM mac_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ERL_NIF_TERM mac_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ERL_NIF_TERM mac_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+
#endif /* E_MAC_H__ */