aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/c_src/hash.h')
-rw-r--r--lib/crypto/c_src/hash.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/crypto/c_src/hash.h b/lib/crypto/c_src/hash.h
new file mode 100644
index 0000000000..c4fb263504
--- /dev/null
+++ b/lib/crypto/c_src/hash.h
@@ -0,0 +1,20 @@
+#ifndef E_HASH_H__
+#define E_HASH_H__ 1
+
+#include "common.h"
+
+#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(1,0,0)
+struct evp_md_ctx {
+ EVP_MD_CTX* ctx;
+};
+extern ErlNifResourceType* evp_md_ctx_rtype;
+
+void evp_md_ctx_dtor(ErlNifEnv* env, struct evp_md_ctx *ctx);
+#endif
+
+ERL_NIF_TERM hash_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ERL_NIF_TERM hash_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ERL_NIF_TERM hash_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ERL_NIF_TERM hash_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+
+#endif /* E_HASH_H__ */