aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/bn.h
diff options
context:
space:
mode:
authorDoug Hogan <[email protected]>2018-12-20 02:00:57 -0800
committerDoug Hogan <[email protected]>2018-12-20 02:30:26 -0800
commit21cd1994c280c705e99d48ae09f2d94e348875a3 (patch)
tree0a24a297c36b612a86ea23dd77bce6a0b3723f25 /lib/crypto/c_src/bn.h
parentfe281a6554a32d654fca40bd65cdafe77140aa9f (diff)
downloadotp-21cd1994c280c705e99d48ae09f2d94e348875a3.tar.gz
otp-21cd1994c280c705e99d48ae09f2d94e348875a3.tar.bz2
otp-21cd1994c280c705e99d48ae09f2d94e348875a3.zip
Move BN and RSA utility functions to new files
Diffstat (limited to 'lib/crypto/c_src/bn.h')
-rw-r--r--lib/crypto/c_src/bn.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/crypto/c_src/bn.h b/lib/crypto/c_src/bn.h
new file mode 100644
index 0000000000..5ff1fa3ea9
--- /dev/null
+++ b/lib/crypto/c_src/bn.h
@@ -0,0 +1,16 @@
+#ifndef E_BN_H__
+#define E_BN_H__ 1
+
+#include "common.h"
+
+ERL_NIF_TERM bin_from_bn(ErlNifEnv* env, const BIGNUM *bn);
+ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+
+#ifdef HAVE_EC
+ERL_NIF_TERM bn2term(ErlNifEnv* env, const BIGNUM *bn);
+#endif
+
+int get_bn_from_mpint(ErlNifEnv* env, ERL_NIF_TERM term, BIGNUM** bnp);
+int get_bn_from_bin(ErlNifEnv* env, ERL_NIF_TERM term, BIGNUM** bnp);
+
+#endif /* E_BN_H__ */