aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/hmac.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/hmac.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/hmac.h')
-rw-r--r--lib/crypto/c_src/hmac.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/crypto/c_src/hmac.h b/lib/crypto/c_src/hmac.h
index 01c6d3d226..5df837a874 100644
--- a/lib/crypto/c_src/hmac.h
+++ b/lib/crypto/c_src/hmac.h
@@ -21,6 +21,8 @@
#ifndef E_HMAC_H__
#define E_HMAC_H__ 1
+#ifndef HAS_EVP_PKEY_CTX
+
#include "common.h"
int init_hmac_ctx(ErlNifEnv *env);
@@ -28,5 +30,6 @@ int init_hmac_ctx(ErlNifEnv *env);
ERL_NIF_TERM hmac_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM hmac_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
ERL_NIF_TERM hmac_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+#endif
#endif /* E_HMAC_H__ */