aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/hmac.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/c_src/hmac.h')
-rw-r--r--lib/crypto/c_src/hmac.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/crypto/c_src/hmac.h b/lib/crypto/c_src/hmac.h
new file mode 100644
index 0000000000..07f4558421
--- /dev/null
+++ b/lib/crypto/c_src/hmac.h
@@ -0,0 +1,21 @@
+#ifndef E_HMAC_H__
+#define E_HMAC_H__ 1
+
+#include "common.h"
+
+struct hmac_context
+{
+ ErlNifMutex* mtx;
+ int alive;
+ HMAC_CTX* ctx;
+};
+
+extern ErlNifResourceType* hmac_context_rtype;
+void hmac_context_dtor(ErlNifEnv* env, struct hmac_context*);
+
+ERL_NIF_TERM hmac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+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 /* E_HMAC_H__ */