You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
481 B
29 lines
481 B
8 years ago
|
%module Elgamal
|
||
9 years ago
|
|
||
|
%include "std_string.i"
|
||
|
%include "std_except.i"
|
||
|
|
||
|
|
||
|
%{
|
||
|
#include <cybozu/random_generator.hpp>
|
||
|
#include <cybozu/crypto.hpp>
|
||
8 years ago
|
#include <mcl/fp.hpp>
|
||
9 years ago
|
#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;
|
||
|
}
|
||
|
};
|
||
|
|
||
8 years ago
|
#include "elgamal_impl.hpp"
|
||
9 years ago
|
%}
|
||
|
%include cpointer.i
|
||
|
%pointer_functions(bool, p_bool);
|
||
|
|
||
8 years ago
|
%include "elgamal_impl.hpp"
|