[java] use Swig 4.0.0

update-fork
MITSUNARI Shigeo 5 years ago
parent d893c71d87
commit 9d7d6f5041
  1. 3
      ffi/java/com/herumi/mcl/CipherText.java
  2. 2
      ffi/java/com/herumi/mcl/Elgamal.java
  3. 2
      ffi/java/com/herumi/mcl/ElgamalJNI.java
  4. 3
      ffi/java/com/herumi/mcl/Fp.java
  5. 3
      ffi/java/com/herumi/mcl/Fr.java
  6. 3
      ffi/java/com/herumi/mcl/G1.java
  7. 3
      ffi/java/com/herumi/mcl/G2.java
  8. 3
      ffi/java/com/herumi/mcl/GT.java
  9. 2
      ffi/java/com/herumi/mcl/Mcl.java
  10. 2
      ffi/java/com/herumi/mcl/MclConstants.java
  11. 2
      ffi/java/com/herumi/mcl/MclJNI.java
  12. 3
      ffi/java/com/herumi/mcl/PrivateKey.java
  13. 3
      ffi/java/com/herumi/mcl/PublicKey.java
  14. 2
      ffi/java/com/herumi/mcl/SWIGTYPE_p_bool.java
  15. 114
      ffi/java/elgamal_wrap.cxx
  16. 166
      ffi/java/mcl_wrap.cxx

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class CipherText {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class Fp {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class Fr {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class G1 {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class G2 {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class GT {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class PrivateKey {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
@ -21,6 +21,7 @@ public class PublicKey {
return (obj == null) ? 0 : obj.swigCPtr; return (obj == null) ? 0 : obj.swigCPtr;
} }
@SuppressWarnings("deprecation")
protected void finalize() { protected void finalize() {
delete(); delete();
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* Do not make changes to this file unless you know what you are doing--modify * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
@ -358,12 +358,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_SystemInit(JNIEnv *jenv,
jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
try { try {
SystemInit((std::string const &)*arg1); SystemInit((std::string const &)*arg1);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -378,12 +376,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_ElgamalJNI_CipherText_1toStr(JNIE
arg1 = *(CipherText **)&jarg1; arg1 = *(CipherText **)&jarg1;
try { try {
result = ((CipherText const *)arg1)->toStr(); result = ((CipherText const *)arg1)->toStr();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -400,12 +396,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_ElgamalJNI_CipherText_1toString(J
arg1 = *(CipherText **)&jarg1; arg1 = *(CipherText **)&jarg1;
try { try {
result = ((CipherText const *)arg1)->toString(); result = ((CipherText const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -430,12 +424,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_CipherText_1fromStr(JNIEn
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->fromStr((std::string const &)*arg2); (arg1)->fromStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -455,12 +447,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_CipherText_1add(JNIEnv *j
} }
try { try {
(arg1)->add((CipherText const &)*arg2); (arg1)->add((CipherText const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -475,12 +465,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_CipherText_1mul_1_1SWIG_1
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
(arg1)->mul(arg2); (arg1)->mul(arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -503,12 +491,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_CipherText_1mul_1_1SWIG_1
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->mul((std::string const &)*arg2); (arg1)->mul((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -545,12 +531,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1toStr(JNIEn
arg1 = *(PublicKey **)&jarg1; arg1 = *(PublicKey **)&jarg1;
try { try {
result = ((PublicKey const *)arg1)->toStr(); result = ((PublicKey const *)arg1)->toStr();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -567,12 +551,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1toString(JN
arg1 = *(PublicKey **)&jarg1; arg1 = *(PublicKey **)&jarg1;
try { try {
result = ((PublicKey const *)arg1)->toString(); result = ((PublicKey const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -597,12 +579,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1fromStr(JNIEnv
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->fromStr((std::string const &)*arg2); (arg1)->fromStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -625,12 +605,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1save(JNIEnv *j
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
((PublicKey const *)arg1)->save((std::string const &)*arg2); ((PublicKey const *)arg1)->save((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -653,12 +631,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1load(JNIEnv *j
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->load((std::string const &)*arg2); (arg1)->load((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -680,12 +656,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1enc_1_1SWIG_10
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
((PublicKey const *)arg1)->enc(*arg2,arg3); ((PublicKey const *)arg1)->enc(*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -715,12 +689,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1enc_1_1SWIG_11
jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); jenv->ReleaseStringUTFChars(jarg3, arg3_pstr);
try { try {
((PublicKey const *)arg1)->enc(*arg2,(std::string const &)*arg3); ((PublicKey const *)arg1)->enc(*arg2,(std::string const &)*arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -740,12 +712,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1rerandomize(JN
} }
try { try {
((PublicKey const *)arg1)->rerandomize(*arg2); ((PublicKey const *)arg1)->rerandomize(*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -767,12 +737,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1add_1_1SWIG_10
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
((PublicKey const *)arg1)->add(*arg2,arg3); ((PublicKey const *)arg1)->add(*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -802,12 +770,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PublicKey_1add_1_1SWIG_11
jenv->ReleaseStringUTFChars(jarg3, arg3_pstr); jenv->ReleaseStringUTFChars(jarg3, arg3_pstr);
try { try {
((PublicKey const *)arg1)->add(*arg2,(std::string const &)*arg3); ((PublicKey const *)arg1)->add(*arg2,(std::string const &)*arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -844,12 +810,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1toStr(JNIE
arg1 = *(PrivateKey **)&jarg1; arg1 = *(PrivateKey **)&jarg1;
try { try {
result = ((PrivateKey const *)arg1)->toStr(); result = ((PrivateKey const *)arg1)->toStr();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -866,12 +830,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1toString(J
arg1 = *(PrivateKey **)&jarg1; arg1 = *(PrivateKey **)&jarg1;
try { try {
result = ((PrivateKey const *)arg1)->toString(); result = ((PrivateKey const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -896,12 +858,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1fromStr(JNIEn
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->fromStr((std::string const &)*arg2); (arg1)->fromStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -924,12 +884,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1save(JNIEnv *
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
((PrivateKey const *)arg1)->save((std::string const &)*arg2); ((PrivateKey const *)arg1)->save((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -952,12 +910,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1load(JNIEnv *
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->load((std::string const &)*arg2); (arg1)->load((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -970,12 +926,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1init(JNIEnv *
arg1 = *(PrivateKey **)&jarg1; arg1 = *(PrivateKey **)&jarg1;
try { try {
(arg1)->init(); (arg1)->init();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -990,12 +944,10 @@ SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1getPublicKey
arg1 = *(PrivateKey **)&jarg1; arg1 = *(PrivateKey **)&jarg1;
try { try {
result = ((PrivateKey const *)arg1)->getPublicKey(); result = ((PrivateKey const *)arg1)->getPublicKey();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
*(PublicKey **)&jresult = new PublicKey((const PublicKey &)result); *(PublicKey **)&jresult = new PublicKey((const PublicKey &)result);
return jresult; return jresult;
} }
@ -1021,12 +973,10 @@ SWIGEXPORT jint JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1dec_1_1SWIG_1
arg3 = *(bool **)&jarg3; arg3 = *(bool **)&jarg3;
try { try {
result = (int)((PrivateKey const *)arg1)->dec((CipherText const &)*arg2,arg3); result = (int)((PrivateKey const *)arg1)->dec((CipherText const &)*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = (jint)result; jresult = (jint)result;
return jresult; return jresult;
} }
@ -1050,12 +1000,10 @@ SWIGEXPORT jint JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1dec_1_1SWIG_1
} }
try { try {
result = (int)((PrivateKey const *)arg1)->dec((CipherText const &)*arg2); result = (int)((PrivateKey const *)arg1)->dec((CipherText const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = (jint)result; jresult = (jint)result;
return jresult; return jresult;
} }
@ -1074,12 +1022,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1setCache(JNIE
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
(arg1)->setCache(arg2,arg3); (arg1)->setCache(arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -1092,12 +1038,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_ElgamalJNI_PrivateKey_1clearCache(JN
arg1 = *(PrivateKey **)&jarg1; arg1 = *(PrivateKey **)&jarg1;
try { try {
(arg1)->clearCache(); (arg1)->clearCache();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }

@ -1,6 +1,6 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12 * Version 4.0.0
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
@ -255,12 +255,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_SystemInit(JNIEnv *jenv, jcla
arg1 = (int)jarg1; arg1 = (int)jarg1;
try { try {
SystemInit(arg1); SystemInit(arg1);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -554,12 +552,10 @@ SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fr_1_1SWIG_13(JNIEnv *j
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
result = (Fr *)new Fr((std::string const &)*arg1,arg2); result = (Fr *)new Fr((std::string const &)*arg1,arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
*(Fr **)&jresult = result; *(Fr **)&jresult = result;
return jresult; return jresult;
} }
@ -583,12 +579,10 @@ SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fr_1_1SWIG_14(JNIEnv *j
jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
try { try {
result = (Fr *)new Fr((std::string const &)*arg1); result = (Fr *)new Fr((std::string const &)*arg1);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
*(Fr **)&jresult = result; *(Fr **)&jresult = result;
return jresult; return jresult;
} }
@ -637,12 +631,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1setStr_1_1SWIG_10(JNIEnv
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
(arg1)->setStr((std::string const &)*arg2,arg3); (arg1)->setStr((std::string const &)*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -665,12 +657,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1setStr_1_1SWIG_11(JNIEnv
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->setStr((std::string const &)*arg2); (arg1)->setStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -722,12 +712,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fr_1toString_1_1SWIG_10(JN
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
result = ((Fr const *)arg1)->toString(arg2); result = ((Fr const *)arg1)->toString(arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -744,12 +732,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fr_1toString_1_1SWIG_11(JN
arg1 = *(Fr **)&jarg1; arg1 = *(Fr **)&jarg1;
try { try {
result = ((Fr const *)arg1)->toString(); result = ((Fr const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -775,12 +761,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fr_1deserialize(JNIEnv *jenv,
} }
try { try {
(arg1)->deserialize((char const *)arg2,arg3); (arg1)->deserialize((char const *)arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
{ {
if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0);
} }
@ -801,12 +785,10 @@ SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_Fr_1serialize(JNIEnv *j
arg1 = *(Fr **)&jarg1; arg1 = *(Fr **)&jarg1;
try { try {
((Fr const *)arg1)->serialize(*arg2); ((Fr const *)arg1)->serialize(*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
{ {
jresult = jenv->NewByteArray(arg2->size()); jresult = jenv->NewByteArray(arg2->size());
jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str());
@ -1028,12 +1010,10 @@ SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fp_1_1SWIG_13(JNIEnv *j
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
result = (Fp *)new Fp((std::string const &)*arg1,arg2); result = (Fp *)new Fp((std::string const &)*arg1,arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
*(Fp **)&jresult = result; *(Fp **)&jresult = result;
return jresult; return jresult;
} }
@ -1057,12 +1037,10 @@ SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1Fp_1_1SWIG_14(JNIEnv *j
jenv->ReleaseStringUTFChars(jarg1, arg1_pstr); jenv->ReleaseStringUTFChars(jarg1, arg1_pstr);
try { try {
result = (Fp *)new Fp((std::string const &)*arg1); result = (Fp *)new Fp((std::string const &)*arg1);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
*(Fp **)&jresult = result; *(Fp **)&jresult = result;
return jresult; return jresult;
} }
@ -1111,12 +1089,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1setStr_1_1SWIG_10(JNIEnv
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
(arg1)->setStr((std::string const &)*arg2,arg3); (arg1)->setStr((std::string const &)*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -1139,12 +1115,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1setStr_1_1SWIG_11(JNIEnv
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->setStr((std::string const &)*arg2); (arg1)->setStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -1196,12 +1170,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fp_1toString_1_1SWIG_10(JN
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
result = ((Fp const *)arg1)->toString(arg2); result = ((Fp const *)arg1)->toString(arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -1218,12 +1190,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_Fp_1toString_1_1SWIG_11(JN
arg1 = *(Fp **)&jarg1; arg1 = *(Fp **)&jarg1;
try { try {
result = ((Fp const *)arg1)->toString(); result = ((Fp const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -1249,12 +1219,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_Fp_1deserialize(JNIEnv *jenv,
} }
try { try {
(arg1)->deserialize((char const *)arg2,arg3); (arg1)->deserialize((char const *)arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
{ {
if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0);
} }
@ -1275,12 +1243,10 @@ SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_Fp_1serialize(JNIEnv *j
arg1 = *(Fp **)&jarg1; arg1 = *(Fp **)&jarg1;
try { try {
((Fp const *)arg1)->serialize(*arg2); ((Fp const *)arg1)->serialize(*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
{ {
jresult = jenv->NewByteArray(arg2->size()); jresult = jenv->NewByteArray(arg2->size());
jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str());
@ -1454,12 +1420,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_hashAndMapToG1(JNIEnv *jenv,
} }
try { try {
hashAndMapToG1(*arg1,(char const *)arg2,arg3); hashAndMapToG1(*arg1,(char const *)arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
{ {
if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0);
} }
@ -1520,12 +1484,10 @@ SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G1_1_1SWIG_12(JNIEnv *j
} }
try { try {
result = (G1 *)new G1((Fp const &)*arg1,(Fp const &)*arg2); result = (G1 *)new G1((Fp const &)*arg1,(Fp const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
*(G1 **)&jresult = result; *(G1 **)&jresult = result;
return jresult; return jresult;
} }
@ -1576,12 +1538,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1set(JNIEnv *jenv, jclass
} }
try { try {
(arg1)->set((Fp const &)*arg2,(Fp const &)*arg3); (arg1)->set((Fp const &)*arg2,(Fp const &)*arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -1617,12 +1577,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1setStr_1_1SWIG_10(JNIEnv
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
(arg1)->setStr((std::string const &)*arg2,arg3); (arg1)->setStr((std::string const &)*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -1645,12 +1603,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1setStr_1_1SWIG_11(JNIEnv
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->setStr((std::string const &)*arg2); (arg1)->setStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -1667,12 +1623,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G1_1toString_1_1SWIG_10(JN
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
result = ((G1 const *)arg1)->toString(arg2); result = ((G1 const *)arg1)->toString(arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -1689,12 +1643,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G1_1toString_1_1SWIG_11(JN
arg1 = *(G1 **)&jarg1; arg1 = *(G1 **)&jarg1;
try { try {
result = ((G1 const *)arg1)->toString(); result = ((G1 const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -1720,12 +1672,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G1_1deserialize(JNIEnv *jenv,
} }
try { try {
(arg1)->deserialize((char const *)arg2,arg3); (arg1)->deserialize((char const *)arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
{ {
if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0);
} }
@ -1746,12 +1696,10 @@ SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_G1_1serialize(JNIEnv *j
arg1 = *(G1 **)&jarg1; arg1 = *(G1 **)&jarg1;
try { try {
((G1 const *)arg1)->serialize(*arg2); ((G1 const *)arg1)->serialize(*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
{ {
jresult = jenv->NewByteArray(arg2->size()); jresult = jenv->NewByteArray(arg2->size());
jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str());
@ -1896,12 +1844,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_hashAndMapToG2(JNIEnv *jenv,
} }
try { try {
hashAndMapToG2(*arg1,(char const *)arg2,arg3); hashAndMapToG2(*arg1,(char const *)arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
{ {
if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0);
} }
@ -1976,12 +1922,10 @@ SWIGEXPORT jlong JNICALL Java_com_herumi_mcl_MclJNI_new_1G2_1_1SWIG_12(JNIEnv *j
} }
try { try {
result = (G2 *)new G2((Fp const &)*arg1,(Fp const &)*arg2,(Fp const &)*arg3,(Fp const &)*arg4); result = (G2 *)new G2((Fp const &)*arg1,(Fp const &)*arg2,(Fp const &)*arg3,(Fp const &)*arg4);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
*(G2 **)&jresult = result; *(G2 **)&jresult = result;
return jresult; return jresult;
} }
@ -2046,12 +1990,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1set(JNIEnv *jenv, jclass
} }
try { try {
(arg1)->set((Fp const &)*arg2,(Fp const &)*arg3,(Fp const &)*arg4,(Fp const &)*arg5); (arg1)->set((Fp const &)*arg2,(Fp const &)*arg3,(Fp const &)*arg4,(Fp const &)*arg5);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -2087,12 +2029,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1setStr_1_1SWIG_10(JNIEnv
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
(arg1)->setStr((std::string const &)*arg2,arg3); (arg1)->setStr((std::string const &)*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -2115,12 +2055,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1setStr_1_1SWIG_11(JNIEnv
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->setStr((std::string const &)*arg2); (arg1)->setStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -2137,12 +2075,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G2_1toString_1_1SWIG_10(JN
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
result = ((G2 const *)arg1)->toString(arg2); result = ((G2 const *)arg1)->toString(arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -2159,12 +2095,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_G2_1toString_1_1SWIG_11(JN
arg1 = *(G2 **)&jarg1; arg1 = *(G2 **)&jarg1;
try { try {
result = ((G2 const *)arg1)->toString(); result = ((G2 const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -2190,12 +2124,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_G2_1deserialize(JNIEnv *jenv,
} }
try { try {
(arg1)->deserialize((char const *)arg2,arg3); (arg1)->deserialize((char const *)arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
{ {
if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0);
} }
@ -2216,12 +2148,10 @@ SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_G2_1serialize(JNIEnv *j
arg1 = *(G2 **)&jarg1; arg1 = *(G2 **)&jarg1;
try { try {
((G2 const *)arg1)->serialize(*arg2); ((G2 const *)arg1)->serialize(*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
{ {
jresult = jenv->NewByteArray(arg2->size()); jresult = jenv->NewByteArray(arg2->size());
jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str());
@ -2354,12 +2284,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_GT_1setStr_1_1SWIG_10(JNIEnv
arg3 = (int)jarg3; arg3 = (int)jarg3;
try { try {
(arg1)->setStr((std::string const &)*arg2,arg3); (arg1)->setStr((std::string const &)*arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -2382,12 +2310,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_GT_1setStr_1_1SWIG_11(JNIEnv
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr); jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
try { try {
(arg1)->setStr((std::string const &)*arg2); (arg1)->setStr((std::string const &)*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
} }
@ -2404,12 +2330,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_GT_1toString_1_1SWIG_10(JN
arg2 = (int)jarg2; arg2 = (int)jarg2;
try { try {
result = ((GT const *)arg1)->toString(arg2); result = ((GT const *)arg1)->toString(arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -2426,12 +2350,10 @@ SWIGEXPORT jstring JNICALL Java_com_herumi_mcl_MclJNI_GT_1toString_1_1SWIG_11(JN
arg1 = *(GT **)&jarg1; arg1 = *(GT **)&jarg1;
try { try {
result = ((GT const *)arg1)->toString(); result = ((GT const *)arg1)->toString();
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
jresult = jenv->NewStringUTF((&result)->c_str()); jresult = jenv->NewStringUTF((&result)->c_str());
return jresult; return jresult;
} }
@ -2457,12 +2379,10 @@ SWIGEXPORT void JNICALL Java_com_herumi_mcl_MclJNI_GT_1deserialize(JNIEnv *jenv,
} }
try { try {
(arg1)->deserialize((char const *)arg2,arg3); (arg1)->deserialize((char const *)arg2,arg3);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return ; return ;
} }
{ {
if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0); if (jarg2) jenv->ReleaseByteArrayElements(jarg2, (jbyte *)arg2, 0);
} }
@ -2483,12 +2403,10 @@ SWIGEXPORT jbyteArray JNICALL Java_com_herumi_mcl_MclJNI_GT_1serialize(JNIEnv *j
arg1 = *(GT **)&jarg1; arg1 = *(GT **)&jarg1;
try { try {
((GT const *)arg1)->serialize(*arg2); ((GT const *)arg1)->serialize(*arg2);
} } catch(std::exception &_e) {
catch(std::exception &_e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what()); SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, (&_e)->what());
return 0; return 0;
} }
{ {
jresult = jenv->NewByteArray(arg2->size()); jresult = jenv->NewByteArray(arg2->size());
jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str()); jenv->SetByteArrayRegion(jresult, 0, arg2->size(), (const jbyte*)arg2->c_str());

Loading…
Cancel
Save