diff options
author | Doug Hogan <[email protected]> | 2018-12-20 02:00:57 -0800 |
---|---|---|
committer | Doug Hogan <[email protected]> | 2018-12-20 02:30:26 -0800 |
commit | 21cd1994c280c705e99d48ae09f2d94e348875a3 (patch) | |
tree | 0a24a297c36b612a86ea23dd77bce6a0b3723f25 /lib/crypto/c_src/bn.h | |
parent | fe281a6554a32d654fca40bd65cdafe77140aa9f (diff) | |
download | otp-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.h | 16 |
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__ */ |