diff --git a/ffi/java/com/herumi/mcl/G1.java b/ffi/java/com/herumi/mcl/G1.java index d46e3f1..ebfb851 100644 --- a/ffi/java/com/herumi/mcl/G1.java +++ b/ffi/java/com/herumi/mcl/G1.java @@ -56,6 +56,10 @@ public class G1 { return MclJNI.G1_isZero(swigCPtr, this); } + public boolean isValidOrder() { + return MclJNI.G1_isValidOrder(swigCPtr, this); + } + public void set(Fp x, Fp y) { MclJNI.G1_set(swigCPtr, this, Fp.getCPtr(x), x, Fp.getCPtr(y), y); } diff --git a/ffi/java/com/herumi/mcl/MclJNI.java b/ffi/java/com/herumi/mcl/MclJNI.java index 05345c2..9724511 100644 --- a/ffi/java/com/herumi/mcl/MclJNI.java +++ b/ffi/java/com/herumi/mcl/MclJNI.java @@ -69,6 +69,7 @@ public class MclJNI { public final static native long new_G1__SWIG_2(long jarg1, Fp jarg1_, long jarg2, Fp jarg2_); public final static native boolean G1_equals(long jarg1, G1 jarg1_, long jarg2, G1 jarg2_); public final static native boolean G1_isZero(long jarg1, G1 jarg1_); + public final static native boolean G1_isValidOrder(long jarg1, G1 jarg1_); public final static native void G1_set(long jarg1, G1 jarg1_, long jarg2, Fp jarg2_, long jarg3, Fp jarg3_); public final static native void G1_clear(long jarg1, G1 jarg1_); public final static native void G1_setStr__SWIG_0(long jarg1, G1 jarg1_, String jarg2, int jarg3); diff --git a/ffi/java/mcl_impl.hpp b/ffi/java/mcl_impl.hpp index 2319114..108ecac 100644 --- a/ffi/java/mcl_impl.hpp +++ b/ffi/java/mcl_impl.hpp @@ -222,6 +222,7 @@ public: : self_(x.self_, y.self_) { } bool equals(const G1& rhs) const { return self_ == rhs.self_; } bool isZero() const { return self_.isZero(); } + bool isValidOrder() const { return self_.isValidOrder(); } void set(const Fp& x, const Fp& y) throw(std::exception) { self_.set(x.self_, y.self_); diff --git a/ffi/java/mcl_wrap.cxx b/ffi/java/mcl_wrap.cxx index 802c722..5b35055 100644 --- a/ffi/java/mcl_wrap.cxx +++ b/ffi/java/mcl_wrap.cxx @@ -1592,6 +1592,19 @@ SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_G1_1isZero(JNIEnv *jenv, return jresult; } +SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_G1_1isValidOrder(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jboolean jresult = 0 ; + G1 *arg1 = (G1 *) 0 ; + bool result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(G1 **)&jarg1; + result = (bool)((G1 const *)arg1)->isValidOrder(); + jresult = (jboolean)result; + return jresult; +} SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) { G1 *arg1 = (G1 *) 0 ;