diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-04-11 18:32:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-11 18:32:33 +0800 |
commit | b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25 (patch) | |
tree | 59d29630eba2f02e452960a70b7bea7e6d32e592 /vendor/github.com/dexon-foundation/mcl/ffi/java/elgamal.i | |
parent | 2922460b04b4378ce202e5fdb92ff6ad9607ab89 (diff) | |
download | dexon-b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25.tar.gz dexon-b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25.tar.zst dexon-b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25.zip |
vendor: use BLS-12_384 curve and update dependencies (#356)
Diffstat (limited to 'vendor/github.com/dexon-foundation/mcl/ffi/java/elgamal.i')
-rw-r--r-- | vendor/github.com/dexon-foundation/mcl/ffi/java/elgamal.i | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/github.com/dexon-foundation/mcl/ffi/java/elgamal.i b/vendor/github.com/dexon-foundation/mcl/ffi/java/elgamal.i new file mode 100644 index 000000000..410723174 --- /dev/null +++ b/vendor/github.com/dexon-foundation/mcl/ffi/java/elgamal.i @@ -0,0 +1,28 @@ +%module Elgamal + +%include "std_string.i" +%include "std_except.i" + + +%{ +#include <cybozu/random_generator.hpp> +#include <cybozu/crypto.hpp> +#include <mcl/fp.hpp> +#include <mcl/ecparam.hpp> +struct Param { +const mcl::EcParam *ecParam; +cybozu::RandomGenerator rg; +cybozu::crypto::Hash::Name hashName; +static inline Param& getParam() +{ + static Param p; + return p; +} +}; + +#include "elgamal_impl.hpp" +%} +%include cpointer.i +%pointer_functions(bool, p_bool); + +%include "elgamal_impl.hpp" |