Add G1.isValidOrder() to JNI

update-fork
Johannes Gallmann 4 years ago
parent 5ea94c2f51
commit 1b08a14e8e
  1. 4
      ffi/java/com/herumi/mcl/G1.java
  2. 1
      ffi/java/com/herumi/mcl/MclJNI.java
  3. 1
      ffi/java/mcl_impl.hpp
  4. 13
      ffi/java/mcl_wrap.cxx

@ -56,6 +56,10 @@ public class G1 {
return MclJNI.G1_isZero(swigCPtr, this); return MclJNI.G1_isZero(swigCPtr, this);
} }
public boolean isValidOrder() {
return MclJNI.G1_isValidOrder(swigCPtr, this);
}
public void set(Fp x, Fp y) { public void set(Fp x, Fp y) {
MclJNI.G1_set(swigCPtr, this, Fp.getCPtr(x), x, Fp.getCPtr(y), y); MclJNI.G1_set(swigCPtr, this, Fp.getCPtr(x), x, Fp.getCPtr(y), y);
} }

@ -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 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_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_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_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_clear(long jarg1, G1 jarg1_);
public final static native void G1_setStr__SWIG_0(long jarg1, G1 jarg1_, String jarg2, int jarg3); public final static native void G1_setStr__SWIG_0(long jarg1, G1 jarg1_, String jarg2, int jarg3);

@ -222,6 +222,7 @@ public:
: self_(x.self_, y.self_) { } : self_(x.self_, y.self_) { }
bool equals(const G1& rhs) const { return self_ == rhs.self_; } bool equals(const G1& rhs) const { return self_ == rhs.self_; }
bool isZero() const { return self_.isZero(); } bool isZero() const { return self_.isZero(); }
bool isValidOrder() const { return self_.isValidOrder(); }
void set(const Fp& x, const Fp& y) throw(std::exception) void set(const Fp& x, const Fp& y) throw(std::exception)
{ {
self_.set(x.self_, y.self_); self_.set(x.self_, y.self_);

@ -1592,6 +1592,19 @@ SWIGEXPORT jboolean JNICALL Java_com_herumi_mcl_MclJNI_G1_1isZero(JNIEnv *jenv,
return jresult; 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_) { 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 ; G1 *arg1 = (G1 *) 0 ;

Loading…
Cancel
Save