diff --git a/bls/CMakeLists.txt b/bls/CMakeLists.txt index 841d1c3..f0bc718 100644 --- a/bls/CMakeLists.txt +++ b/bls/CMakeLists.txt @@ -7,11 +7,12 @@ cmake_minimum_required(VERSION 3.14.0) set(CMAKE_CXX_STANDARD 14) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) -set(CMAKE_CXX_FLAGS, "-fpermissive") +set(CMAKE_CXX_FLAGS "-fpermissive") +set(MI_LOCAL_DYNAMIC_TLS ON CACHE BOOL "Use dlopen-compatible TLS mechanism") add_library( # Sets the name of the library. dashjbls # Sets the library as a shared library. - SHARED + SHARED # Provides a relative path to your source file(s). src/main/cpp/bls-signatures-v1.cpp src/main/cpp/threshold-v1.cpp @@ -46,7 +47,8 @@ target_link_libraries( # Specifies the target library. dashjbls # Links the target library to the bls library - bls-dash) + dashbls +) # import the bls-signature project as is add_subdirectory(src/main/cpp/bls-signatures) \ No newline at end of file diff --git a/bls/pom.xml b/bls/pom.xml index 52b1e7c..717a8df 100644 --- a/bls/pom.xml +++ b/bls/pom.xml @@ -5,7 +5,7 @@ dashj-bls-parent org.dashj - 1.0.1 + 1.3.5-SNAPSHOT 4.0.0 diff --git a/bls/src/main/cpp/bls-signatures b/bls/src/main/cpp/bls-signatures index bc880a3..0bb5c5b 160000 --- a/bls/src/main/cpp/bls-signatures +++ b/bls/src/main/cpp/bls-signatures @@ -1 +1 @@ -Subproject commit bc880a3ca97857ae8ec78cd027823132f64fc2d6 +Subproject commit 0bb5c5b03249c463debb5cef5f7e52ee66f3aaab diff --git a/bls/src/main/cpp/bls-signatures-v1.cpp b/bls/src/main/cpp/bls-signatures-v1.cpp index 8444b66..d821b5f 100644 --- a/bls/src/main/cpp/bls-signatures-v1.cpp +++ b/bls/src/main/cpp/bls-signatures-v1.cpp @@ -1,42 +1,14 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.0 * - * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * Do not make changes to this file unless you know what you are doing - modify + * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ -#ifndef SWIGJAVA +#define SWIG_VERSION 0x040200 #define SWIGJAVA -#endif - - - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif /* ----------------------------------------------------------------------------- * This section contains generic SWIG labels for method/variable @@ -162,18 +134,12 @@ template T SwigValueInit() { # pragma warning disable 592 #endif +#if __cplusplus >=201103L +# define SWIG_NULLPTR nullptr +#else +# define SWIG_NULLPTR NULL +#endif -/* Fix for jlong on some versions of gcc on Windows */ -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) - typedef long long __int64; -#endif - -/* Fix for jlong on 64-bit x86 Solaris */ -#if defined(__x86_64) -# ifdef _LP64 -# undef _LP64 -# endif -#endif #include #include @@ -229,9 +195,9 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC /* Contract support */ -#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else +#define SWIG_contract_assert(nullreturn, expr, msg) do { if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } } while (0) -/* Errors in SWIG */ +/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */ #define SWIG_UnknownError -1 #define SWIG_IOError -2 #define SWIG_RuntimeError -3 @@ -248,18 +214,65 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC +#ifdef __cplusplus +#include +/* SwigValueWrapper is described in swig.swg */ +template class SwigValueWrapper { + struct SwigSmartPointer { + T *ptr; + SwigSmartPointer(T *p) : ptr(p) { } + ~SwigSmartPointer() { delete ptr; } + SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; } +#if __cplusplus >=201103L + SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; } + operator T&&() const { return std::move(*pointer.ptr); } +#else + operator T&() const { return *pointer.ptr; } +#endif + T *operator&() const { return pointer.ptr; } + static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); } +}; + +/* + * SwigValueInit() is a generic initialisation solution as the following approach: + * + * T c_result = T(); + * + * doesn't compile for all types for example: + * + * unsigned int c_result = unsigned int(); + */ +template T SwigValueInit() { + return T(); +} + +#if __cplusplus >=201103L +# define SWIG_STD_MOVE(OBJ) std::move(OBJ) +#else +# define SWIG_STD_MOVE(OBJ) OBJ +#endif + +#endif + -#include "bls-signatures/src/bls.hpp" -#include "bls-signatures/src/chaincode.hpp" -#include "bls-signatures/src/elements.hpp" -#include "bls-signatures/src/extendedprivatekey.hpp" -#include "bls-signatures/src/extendedpublickey.hpp" -#include "bls-signatures/src/hdkeys.hpp" -#include "bls-signatures/src/hkdf.hpp" -#include "bls-signatures/src/privatekey.hpp" -#include "bls-signatures/src/schemes.hpp" -#include "bls-signatures/src/threshold.hpp" -#include "bls-signatures/src/util.hpp" +#include "bls-signatures/include/dashbls/bls.hpp" +#include "bls-signatures/include/dashbls/chaincode.hpp" +#include "bls-signatures/include/dashbls/elements.hpp" +#include "bls-signatures/include/dashbls/extendedprivatekey.hpp" +#include "bls-signatures/include/dashbls/extendedpublickey.hpp" +#include "bls-signatures/include/dashbls/hdkeys.hpp" +#include "bls-signatures/include/dashbls/hkdf.hpp" +#include "bls-signatures/include/dashbls/privatekey.hpp" +#include "bls-signatures/include/dashbls/schemes.hpp" +#include "bls-signatures/include/dashbls/threshold.hpp" +#include "bls-signatures/include/dashbls/util.hpp" #include "threshold-v1.hpp" using namespace bls; @@ -275,7 +288,7 @@ using namespace bls; #include -#include "bls-signatures/src/util.hpp" +#include "bls-signatures/include/dashbls/util.hpp" /* Check for overflow converting to Java int (always signed 32-bit) from (unsigned variable-bit) size_t */ @@ -297,6 +310,14 @@ SWIGINTERN std::vector< uint8_t > *new_std_vector_Sl_uint8_t_Sg___SWIG_2(jint co throw std::out_of_range("vector count must be positive"); return new std::vector< unsigned char >(static_cast::size_type>(count), value); } +SWIGINTERN jint std_vector_Sl_uint8_t_Sg__doCapacity(std::vector< uint8_t > *self){ + return SWIG_VectorSize(self->capacity()); + } +SWIGINTERN void std_vector_Sl_uint8_t_Sg__doReserve(std::vector< uint8_t > *self,jint n){ + if (n < 0) + throw std::out_of_range("vector reserve size must be positive"); + self->reserve(n); + } SWIGINTERN jint std_vector_Sl_uint8_t_Sg__doSize(std::vector< uint8_t > const *self){ return SWIG_VectorSize(self->size()); } @@ -351,6 +372,14 @@ SWIGINTERN std::vector< std::vector< uint8_t > > *new_std_vector_Sl_std_vector_S throw std::out_of_range("vector count must be positive"); return new std::vector< std::vector< uint8_t > >(static_cast >::size_type>(count), value); } +SWIGINTERN jint std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doCapacity(std::vector< std::vector< uint8_t > > *self){ + return SWIG_VectorSize(self->capacity()); + } +SWIGINTERN void std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doReserve(std::vector< std::vector< uint8_t > > *self,jint n){ + if (n < 0) + throw std::out_of_range("vector reserve size must be positive"); + self->reserve(n); + } SWIGINTERN jint std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doSize(std::vector< std::vector< uint8_t > > const *self){ return SWIG_VectorSize(self->size()); } @@ -405,6 +434,14 @@ SWIGINTERN std::vector< bls::PrivateKey > *new_std_vector_Sl_bls_PrivateKey_Sg__ throw std::out_of_range("vector count must be positive"); return new std::vector< bls::PrivateKey >(static_cast::size_type>(count), value); } +SWIGINTERN jint std_vector_Sl_bls_PrivateKey_Sg__doCapacity(std::vector< bls::PrivateKey > *self){ + return SWIG_VectorSize(self->capacity()); + } +SWIGINTERN void std_vector_Sl_bls_PrivateKey_Sg__doReserve(std::vector< bls::PrivateKey > *self,jint n){ + if (n < 0) + throw std::out_of_range("vector reserve size must be positive"); + self->reserve(n); + } SWIGINTERN jint std_vector_Sl_bls_PrivateKey_Sg__doSize(std::vector< bls::PrivateKey > const *self){ return SWIG_VectorSize(self->size()); } @@ -459,6 +496,14 @@ SWIGINTERN std::vector< bls::G1Element > *new_std_vector_Sl_bls_G1Element_Sg___S throw std::out_of_range("vector count must be positive"); return new std::vector< bls::G1Element >(static_cast::size_type>(count), value); } +SWIGINTERN jint std_vector_Sl_bls_G1Element_Sg__doCapacity(std::vector< bls::G1Element > *self){ + return SWIG_VectorSize(self->capacity()); + } +SWIGINTERN void std_vector_Sl_bls_G1Element_Sg__doReserve(std::vector< bls::G1Element > *self,jint n){ + if (n < 0) + throw std::out_of_range("vector reserve size must be positive"); + self->reserve(n); + } SWIGINTERN jint std_vector_Sl_bls_G1Element_Sg__doSize(std::vector< bls::G1Element > const *self){ return SWIG_VectorSize(self->size()); } @@ -513,6 +558,14 @@ SWIGINTERN std::vector< bls::G2Element > *new_std_vector_Sl_bls_G2Element_Sg___S throw std::out_of_range("vector count must be positive"); return new std::vector< bls::G2Element >(static_cast::size_type>(count), value); } +SWIGINTERN jint std_vector_Sl_bls_G2Element_Sg__doCapacity(std::vector< bls::G2Element > *self){ + return SWIG_VectorSize(self->capacity()); + } +SWIGINTERN void std_vector_Sl_bls_G2Element_Sg__doReserve(std::vector< bls::G2Element > *self,jint n){ + if (n < 0) + throw std::out_of_range("vector reserve size must be positive"); + self->reserve(n); + } SWIGINTERN jint std_vector_Sl_bls_G2Element_Sg__doSize(std::vector< bls::G2Element > const *self){ return SWIG_VectorSize(self->size()); } @@ -644,7 +697,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8Vector_1_1SWIG (void)jarg1_; arg1 = *(std::vector< uint8_t > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< uint8_t > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< uint8_t > const & is null"); return 0; } result = (std::vector< uint8_t > *)new std::vector< uint8_t >((std::vector< uint8_t > const &)*arg1); @@ -653,39 +706,6 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8Vector_1_1SWIG } -SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1capacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { - jint jresult = 0 ; - std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ; - std::vector< unsigned char >::size_type result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< uint8_t > **)&jarg1; - result = (std::vector< unsigned char >::size_type)((std::vector< uint8_t > const *)arg1)->capacity(); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1reserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { - std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ; - std::vector< unsigned char >::size_type arg2 ; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< uint8_t > **)&jarg1; - arg2 = (std::vector< unsigned char >::size_type)jarg2; - try { - (arg1)->reserve(arg2); - } catch(std::length_error &_e) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); - return ; - } -} - - SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1isEmpty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ; @@ -725,7 +745,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8Vector_1_1SWIG temp2 = (unsigned char)jarg2; arg2 = &temp2; try { - result = (std::vector< uint8_t > *)new_std_vector_Sl_uint8_t_Sg___SWIG_2(arg1,(unsigned char const &)*arg2); + result = (std::vector< uint8_t > *)new_std_vector_Sl_uint8_t_Sg___SWIG_2(SWIG_STD_MOVE(arg1),(unsigned char const &)*arg2); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -735,6 +755,47 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8Vector_1_1SWIG } +SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ; + jint result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< uint8_t > **)&jarg1; + try { + result = std_vector_Sl_uint8_t_Sg__doCapacity(arg1); + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return 0; + } + jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { + std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ; + jint arg2 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< uint8_t > **)&jarg1; + arg2 = jarg2; + try { + std_vector_Sl_uint8_t_Sg__doReserve(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::length_error &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } +} + + SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ; @@ -784,7 +845,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doAdd_1_1SWI temp3 = (std::vector< unsigned char >::value_type)jarg3; arg3 = &temp3; try { - std_vector_Sl_uint8_t_Sg__doAdd__SWIG_1(arg1,arg2,(unsigned char const &)*arg3); + std_vector_Sl_uint8_t_Sg__doAdd__SWIG_1(arg1,SWIG_STD_MOVE(arg2),(unsigned char const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -804,7 +865,7 @@ SWIGEXPORT jshort JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doRemove(J arg1 = *(std::vector< uint8_t > **)&jarg1; arg2 = jarg2; try { - result = (std::vector< unsigned char >::value_type)std_vector_Sl_uint8_t_Sg__doRemove(arg1,arg2); + result = (std::vector< unsigned char >::value_type)std_vector_Sl_uint8_t_Sg__doRemove(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -826,7 +887,7 @@ SWIGEXPORT jshort JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doGet(JNIE arg1 = *(std::vector< uint8_t > **)&jarg1; arg2 = jarg2; try { - result = (std::vector< unsigned char >::value_type *) &std_vector_Sl_uint8_t_Sg__doGet(arg1,arg2); + result = (std::vector< unsigned char >::value_type *) &std_vector_Sl_uint8_t_Sg__doGet(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -852,7 +913,7 @@ SWIGEXPORT jshort JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doSet(JNIE temp3 = (std::vector< unsigned char >::value_type)jarg3; arg3 = &temp3; try { - result = (std::vector< unsigned char >::value_type)std_vector_Sl_uint8_t_Sg__doSet(arg1,arg2,(unsigned char const &)*arg3); + result = (std::vector< unsigned char >::value_type)std_vector_Sl_uint8_t_Sg__doSet(arg1,SWIG_STD_MOVE(arg2),(unsigned char const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -874,7 +935,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8Vector_1doRemoveRang arg2 = jarg2; arg3 = jarg3; try { - std_vector_Sl_uint8_t_Sg__doRemoveRange(arg1,arg2,arg3); + std_vector_Sl_uint8_t_Sg__doRemoveRange(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -946,7 +1007,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8VectorVector_1 (void)jarg1_; arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & is null"); return 0; } result = (std::vector< std::vector< uint8_t > > *)new std::vector< std::vector< uint8_t > >((std::vector< std::vector< uint8_t > > const &)*arg1); @@ -955,39 +1016,6 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8VectorVector_1 } -SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1capacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { - jint jresult = 0 ; - std::vector< std::vector< uint8_t > > *arg1 = (std::vector< std::vector< uint8_t > > *) 0 ; - std::vector< std::vector< unsigned char > >::size_type result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; - result = (std::vector< std::vector< unsigned char > >::size_type)((std::vector< std::vector< uint8_t > > const *)arg1)->capacity(); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1reserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { - std::vector< std::vector< uint8_t > > *arg1 = (std::vector< std::vector< uint8_t > > *) 0 ; - std::vector< std::vector< unsigned char > >::size_type arg2 ; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; - arg2 = (std::vector< std::vector< unsigned char > >::size_type)jarg2; - try { - (arg1)->reserve(arg2); - } catch(std::length_error &_e) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); - return ; - } -} - - SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1isEmpty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; std::vector< std::vector< uint8_t > > *arg1 = (std::vector< std::vector< uint8_t > > *) 0 ; @@ -1026,11 +1054,11 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8VectorVector_1 arg1 = jarg1; arg2 = *(std::vector< uint8_t > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< uint8_t > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< uint8_t > const & is null"); return 0; } try { - result = (std::vector< std::vector< uint8_t > > *)new_std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg___SWIG_2(arg1,(std::vector< unsigned char > const &)*arg2); + result = (std::vector< std::vector< uint8_t > > *)new_std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg___SWIG_2(SWIG_STD_MOVE(arg1),(std::vector< unsigned char > const &)*arg2); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -1040,6 +1068,47 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1Uint8VectorVector_1 } +SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + std::vector< std::vector< uint8_t > > *arg1 = (std::vector< std::vector< uint8_t > > *) 0 ; + jint result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; + try { + result = std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doCapacity(arg1); + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return 0; + } + jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { + std::vector< std::vector< uint8_t > > *arg1 = (std::vector< std::vector< uint8_t > > *) 0 ; + jint arg2 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; + arg2 = jarg2; + try { + std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doReserve(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::length_error &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } +} + + SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; std::vector< std::vector< uint8_t > > *arg1 = (std::vector< std::vector< uint8_t > > *) 0 ; @@ -1071,7 +1140,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doAdd_ arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; arg2 = *(std::vector< std::vector< unsigned char > >::value_type **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< unsigned char > >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< unsigned char > >::value_type const & is null"); return ; } std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doAdd__SWIG_0(arg1,(std::vector< unsigned char > const &)*arg2); @@ -1091,11 +1160,11 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doAdd_ arg2 = jarg2; arg3 = *(std::vector< std::vector< unsigned char > >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< unsigned char > >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< unsigned char > >::value_type const & is null"); return ; } try { - std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doAdd__SWIG_1(arg1,arg2,(std::vector< unsigned char > const &)*arg3); + std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doAdd__SWIG_1(arg1,SWIG_STD_MOVE(arg2),(std::vector< unsigned char > const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -1115,12 +1184,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doRem arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; arg2 = jarg2; try { - result = std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doRemove(arg1,arg2); + result = std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doRemove(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< std::vector< unsigned char > >::value_type **)&jresult = new std::vector< std::vector< unsigned char > >::value_type((const std::vector< std::vector< unsigned char > >::value_type &)result); + *(std::vector< std::vector< unsigned char > >::value_type **)&jresult = new std::vector< std::vector< unsigned char > >::value_type(result); return jresult; } @@ -1137,7 +1206,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doGet arg1 = *(std::vector< std::vector< uint8_t > > **)&jarg1; arg2 = jarg2; try { - result = (std::vector< std::vector< unsigned char > >::value_type *) &std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doGet(arg1,arg2); + result = (std::vector< std::vector< unsigned char > >::value_type *) &std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doGet(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -1162,16 +1231,16 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doSet arg2 = jarg2; arg3 = *(std::vector< std::vector< unsigned char > >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< unsigned char > >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< unsigned char > >::value_type const & is null"); return 0; } try { - result = std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doSet(arg1,arg2,(std::vector< unsigned char > const &)*arg3); + result = std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doSet(arg1,SWIG_STD_MOVE(arg2),(std::vector< unsigned char > const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< std::vector< unsigned char > >::value_type **)&jresult = new std::vector< std::vector< unsigned char > >::value_type((const std::vector< std::vector< unsigned char > >::value_type &)result); + *(std::vector< std::vector< unsigned char > >::value_type **)&jresult = new std::vector< std::vector< unsigned char > >::value_type(result); return jresult; } @@ -1188,7 +1257,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_Uint8VectorVector_1doRemo arg2 = jarg2; arg3 = jarg3; try { - std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doRemoveRange(arg1,arg2,arg3); + std_vector_Sl_std_vector_Sl_uint8_t_Sg__Sg__doRemoveRange(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -1260,7 +1329,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1PrivateKeyVector_1_ (void)jarg1_; arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & is null"); return 0; } result = (std::vector< bls::PrivateKey > *)new std::vector< bls::PrivateKey >((std::vector< bls::PrivateKey > const &)*arg1); @@ -1269,39 +1338,6 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1PrivateKeyVector_1_ } -SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1capacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { - jint jresult = 0 ; - std::vector< bls::PrivateKey > *arg1 = (std::vector< bls::PrivateKey > *) 0 ; - std::vector< bls::PrivateKey >::size_type result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; - result = (std::vector< bls::PrivateKey >::size_type)((std::vector< bls::PrivateKey > const *)arg1)->capacity(); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1reserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { - std::vector< bls::PrivateKey > *arg1 = (std::vector< bls::PrivateKey > *) 0 ; - std::vector< bls::PrivateKey >::size_type arg2 ; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; - arg2 = (std::vector< bls::PrivateKey >::size_type)jarg2; - try { - (arg1)->reserve(arg2); - } catch(std::length_error &_e) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); - return ; - } -} - - SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1isEmpty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; std::vector< bls::PrivateKey > *arg1 = (std::vector< bls::PrivateKey > *) 0 ; @@ -1340,11 +1376,11 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1PrivateKeyVector_1_ arg1 = jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } try { - result = (std::vector< bls::PrivateKey > *)new_std_vector_Sl_bls_PrivateKey_Sg___SWIG_2(arg1,(bls::PrivateKey const &)*arg2); + result = (std::vector< bls::PrivateKey > *)new_std_vector_Sl_bls_PrivateKey_Sg___SWIG_2(SWIG_STD_MOVE(arg1),(bls::PrivateKey const &)*arg2); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -1354,6 +1390,47 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1PrivateKeyVector_1_ } +SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + std::vector< bls::PrivateKey > *arg1 = (std::vector< bls::PrivateKey > *) 0 ; + jint result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; + try { + result = std_vector_Sl_bls_PrivateKey_Sg__doCapacity(arg1); + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return 0; + } + jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { + std::vector< bls::PrivateKey > *arg1 = (std::vector< bls::PrivateKey > *) 0 ; + jint arg2 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; + arg2 = jarg2; + try { + std_vector_Sl_bls_PrivateKey_Sg__doReserve(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::length_error &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } +} + + SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; std::vector< bls::PrivateKey > *arg1 = (std::vector< bls::PrivateKey > *) 0 ; @@ -1385,7 +1462,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doAdd_1 arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; arg2 = *(std::vector< bls::PrivateKey >::value_type **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey >::value_type const & is null"); return ; } std_vector_Sl_bls_PrivateKey_Sg__doAdd__SWIG_0(arg1,(bls::PrivateKey const &)*arg2); @@ -1405,11 +1482,11 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doAdd_1 arg2 = jarg2; arg3 = *(std::vector< bls::PrivateKey >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey >::value_type const & is null"); return ; } try { - std_vector_Sl_bls_PrivateKey_Sg__doAdd__SWIG_1(arg1,arg2,(bls::PrivateKey const &)*arg3); + std_vector_Sl_bls_PrivateKey_Sg__doAdd__SWIG_1(arg1,SWIG_STD_MOVE(arg2),(bls::PrivateKey const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -1429,12 +1506,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doRemo arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; arg2 = jarg2; try { - result = std_vector_Sl_bls_PrivateKey_Sg__doRemove(arg1,arg2); + result = std_vector_Sl_bls_PrivateKey_Sg__doRemove(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< bls::PrivateKey >::value_type **)&jresult = new std::vector< bls::PrivateKey >::value_type((const std::vector< bls::PrivateKey >::value_type &)result); + *(std::vector< bls::PrivateKey >::value_type **)&jresult = new std::vector< bls::PrivateKey >::value_type(result); return jresult; } @@ -1451,7 +1528,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doGet( arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; arg2 = jarg2; try { - result = (std::vector< bls::PrivateKey >::value_type *) &std_vector_Sl_bls_PrivateKey_Sg__doGet(arg1,arg2); + result = (std::vector< bls::PrivateKey >::value_type *) &std_vector_Sl_bls_PrivateKey_Sg__doGet(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -1476,16 +1553,16 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doSet( arg2 = jarg2; arg3 = *(std::vector< bls::PrivateKey >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey >::value_type const & is null"); return 0; } try { - result = std_vector_Sl_bls_PrivateKey_Sg__doSet(arg1,arg2,(bls::PrivateKey const &)*arg3); + result = std_vector_Sl_bls_PrivateKey_Sg__doSet(arg1,SWIG_STD_MOVE(arg2),(bls::PrivateKey const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< bls::PrivateKey >::value_type **)&jresult = new std::vector< bls::PrivateKey >::value_type((const std::vector< bls::PrivateKey >::value_type &)result); + *(std::vector< bls::PrivateKey >::value_type **)&jresult = new std::vector< bls::PrivateKey >::value_type(result); return jresult; } @@ -1502,7 +1579,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKeyVector_1doRemov arg2 = jarg2; arg3 = jarg3; try { - std_vector_Sl_bls_PrivateKey_Sg__doRemoveRange(arg1,arg2,arg3); + std_vector_Sl_bls_PrivateKey_Sg__doRemoveRange(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -1574,7 +1651,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G1ElementVector_1_1 (void)jarg1_; arg1 = *(std::vector< bls::G1Element > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & is null"); return 0; } result = (std::vector< bls::G1Element > *)new std::vector< bls::G1Element >((std::vector< bls::G1Element > const &)*arg1); @@ -1583,39 +1660,6 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G1ElementVector_1_1 } -SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1capacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { - jint jresult = 0 ; - std::vector< bls::G1Element > *arg1 = (std::vector< bls::G1Element > *) 0 ; - std::vector< bls::G1Element >::size_type result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< bls::G1Element > **)&jarg1; - result = (std::vector< bls::G1Element >::size_type)((std::vector< bls::G1Element > const *)arg1)->capacity(); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1reserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { - std::vector< bls::G1Element > *arg1 = (std::vector< bls::G1Element > *) 0 ; - std::vector< bls::G1Element >::size_type arg2 ; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< bls::G1Element > **)&jarg1; - arg2 = (std::vector< bls::G1Element >::size_type)jarg2; - try { - (arg1)->reserve(arg2); - } catch(std::length_error &_e) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); - return ; - } -} - - SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1isEmpty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jboolean jresult = 0 ; std::vector< bls::G1Element > *arg1 = (std::vector< bls::G1Element > *) 0 ; @@ -1654,11 +1698,11 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G1ElementVector_1_1 arg1 = jarg1; arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } try { - result = (std::vector< bls::G1Element > *)new_std_vector_Sl_bls_G1Element_Sg___SWIG_2(arg1,(bls::G1Element const &)*arg2); + result = (std::vector< bls::G1Element > *)new_std_vector_Sl_bls_G1Element_Sg___SWIG_2(SWIG_STD_MOVE(arg1),(bls::G1Element const &)*arg2); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -1668,6 +1712,47 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G1ElementVector_1_1 } +SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + std::vector< bls::G1Element > *arg1 = (std::vector< bls::G1Element > *) 0 ; + jint result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< bls::G1Element > **)&jarg1; + try { + result = std_vector_Sl_bls_G1Element_Sg__doCapacity(arg1); + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return 0; + } + jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { + std::vector< bls::G1Element > *arg1 = (std::vector< bls::G1Element > *) 0 ; + jint arg2 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< bls::G1Element > **)&jarg1; + arg2 = jarg2; + try { + std_vector_Sl_bls_G1Element_Sg__doReserve(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::length_error &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } +} + + SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; std::vector< bls::G1Element > *arg1 = (std::vector< bls::G1Element > *) 0 ; @@ -1699,7 +1784,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doAdd_1_ arg1 = *(std::vector< bls::G1Element > **)&jarg1; arg2 = *(std::vector< bls::G1Element >::value_type **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element >::value_type const & is null"); return ; } std_vector_Sl_bls_G1Element_Sg__doAdd__SWIG_0(arg1,(bls::G1Element const &)*arg2); @@ -1719,11 +1804,11 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doAdd_1_ arg2 = jarg2; arg3 = *(std::vector< bls::G1Element >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element >::value_type const & is null"); return ; } try { - std_vector_Sl_bls_G1Element_Sg__doAdd__SWIG_1(arg1,arg2,(bls::G1Element const &)*arg3); + std_vector_Sl_bls_G1Element_Sg__doAdd__SWIG_1(arg1,SWIG_STD_MOVE(arg2),(bls::G1Element const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -1743,12 +1828,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doRemov arg1 = *(std::vector< bls::G1Element > **)&jarg1; arg2 = jarg2; try { - result = std_vector_Sl_bls_G1Element_Sg__doRemove(arg1,arg2); + result = std_vector_Sl_bls_G1Element_Sg__doRemove(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< bls::G1Element >::value_type **)&jresult = new std::vector< bls::G1Element >::value_type((const std::vector< bls::G1Element >::value_type &)result); + *(std::vector< bls::G1Element >::value_type **)&jresult = new std::vector< bls::G1Element >::value_type(result); return jresult; } @@ -1765,7 +1850,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doGet(J arg1 = *(std::vector< bls::G1Element > **)&jarg1; arg2 = jarg2; try { - result = (std::vector< bls::G1Element >::value_type *) &std_vector_Sl_bls_G1Element_Sg__doGet(arg1,arg2); + result = (std::vector< bls::G1Element >::value_type *) &std_vector_Sl_bls_G1Element_Sg__doGet(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -1790,16 +1875,16 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doSet(J arg2 = jarg2; arg3 = *(std::vector< bls::G1Element >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element >::value_type const & is null"); return 0; } try { - result = std_vector_Sl_bls_G1Element_Sg__doSet(arg1,arg2,(bls::G1Element const &)*arg3); + result = std_vector_Sl_bls_G1Element_Sg__doSet(arg1,SWIG_STD_MOVE(arg2),(bls::G1Element const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< bls::G1Element >::value_type **)&jresult = new std::vector< bls::G1Element >::value_type((const std::vector< bls::G1Element >::value_type &)result); + *(std::vector< bls::G1Element >::value_type **)&jresult = new std::vector< bls::G1Element >::value_type(result); return jresult; } @@ -1816,7 +1901,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1ElementVector_1doRemove arg2 = jarg2; arg3 = jarg3; try { - std_vector_Sl_bls_G1Element_Sg__doRemoveRange(arg1,arg2,arg3); + std_vector_Sl_bls_G1Element_Sg__doRemoveRange(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -1884,49 +1969,16 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G2ElementVector_1_1 std::vector< bls::G2Element > *result = 0 ; (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< bls::G2Element > **)&jarg1; - if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & reference is null"); - return 0; - } - result = (std::vector< bls::G2Element > *)new std::vector< bls::G2Element >((std::vector< bls::G2Element > const &)*arg1); - *(std::vector< bls::G2Element > **)&jresult = result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1capacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { - jint jresult = 0 ; - std::vector< bls::G2Element > *arg1 = (std::vector< bls::G2Element > *) 0 ; - std::vector< bls::G2Element >::size_type result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< bls::G2Element > **)&jarg1; - result = (std::vector< bls::G2Element >::size_type)((std::vector< bls::G2Element > const *)arg1)->capacity(); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1reserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { - std::vector< bls::G2Element > *arg1 = (std::vector< bls::G2Element > *) 0 ; - std::vector< bls::G2Element >::size_type arg2 ; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(std::vector< bls::G2Element > **)&jarg1; - arg2 = (std::vector< bls::G2Element >::size_type)jarg2; - try { - (arg1)->reserve(arg2); - } catch(std::length_error &_e) { - SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); - return ; - } + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< bls::G2Element > **)&jarg1; + if (!arg1) { + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & is null"); + return 0; + } + result = (std::vector< bls::G2Element > *)new std::vector< bls::G2Element >((std::vector< bls::G2Element > const &)*arg1); + *(std::vector< bls::G2Element > **)&jresult = result; + return jresult; } @@ -1968,11 +2020,11 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G2ElementVector_1_1 arg1 = jarg1; arg2 = *(bls::G2Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } try { - result = (std::vector< bls::G2Element > *)new_std_vector_Sl_bls_G2Element_Sg___SWIG_2(arg1,(bls::G2Element const &)*arg2); + result = (std::vector< bls::G2Element > *)new_std_vector_Sl_bls_G2Element_Sg___SWIG_2(SWIG_STD_MOVE(arg1),(bls::G2Element const &)*arg2); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -1982,6 +2034,47 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G2ElementVector_1_1 } +SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doCapacity(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jint jresult = 0 ; + std::vector< bls::G2Element > *arg1 = (std::vector< bls::G2Element > *) 0 ; + jint result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< bls::G2Element > **)&jarg1; + try { + result = std_vector_Sl_bls_G2Element_Sg__doCapacity(arg1); + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return 0; + } + jresult = result; + return jresult; +} + + +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doReserve(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { + std::vector< bls::G2Element > *arg1 = (std::vector< bls::G2Element > *) 0 ; + jint arg2 ; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(std::vector< bls::G2Element > **)&jarg1; + arg2 = jarg2; + try { + std_vector_Sl_bls_G2Element_Sg__doReserve(arg1,SWIG_STD_MOVE(arg2)); + } catch(std::length_error &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } catch(std::out_of_range &_e) { + SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); + return ; + } +} + + SWIGEXPORT jint JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { jint jresult = 0 ; std::vector< bls::G2Element > *arg1 = (std::vector< bls::G2Element > *) 0 ; @@ -2013,7 +2106,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doAdd_1_ arg1 = *(std::vector< bls::G2Element > **)&jarg1; arg2 = *(std::vector< bls::G2Element >::value_type **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element >::value_type const & is null"); return ; } std_vector_Sl_bls_G2Element_Sg__doAdd__SWIG_0(arg1,(bls::G2Element const &)*arg2); @@ -2033,11 +2126,11 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doAdd_1_ arg2 = jarg2; arg3 = *(std::vector< bls::G2Element >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element >::value_type const & is null"); return ; } try { - std_vector_Sl_bls_G2Element_Sg__doAdd__SWIG_1(arg1,arg2,(bls::G2Element const &)*arg3); + std_vector_Sl_bls_G2Element_Sg__doAdd__SWIG_1(arg1,SWIG_STD_MOVE(arg2),(bls::G2Element const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -2057,12 +2150,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doRemov arg1 = *(std::vector< bls::G2Element > **)&jarg1; arg2 = jarg2; try { - result = std_vector_Sl_bls_G2Element_Sg__doRemove(arg1,arg2); + result = std_vector_Sl_bls_G2Element_Sg__doRemove(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< bls::G2Element >::value_type **)&jresult = new std::vector< bls::G2Element >::value_type((const std::vector< bls::G2Element >::value_type &)result); + *(std::vector< bls::G2Element >::value_type **)&jresult = new std::vector< bls::G2Element >::value_type(result); return jresult; } @@ -2079,7 +2172,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doGet(J arg1 = *(std::vector< bls::G2Element > **)&jarg1; arg2 = jarg2; try { - result = (std::vector< bls::G2Element >::value_type *) &std_vector_Sl_bls_G2Element_Sg__doGet(arg1,arg2); + result = (std::vector< bls::G2Element >::value_type *) &std_vector_Sl_bls_G2Element_Sg__doGet(arg1,SWIG_STD_MOVE(arg2)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; @@ -2104,16 +2197,16 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doSet(J arg2 = jarg2; arg3 = *(std::vector< bls::G2Element >::value_type **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element >::value_type const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element >::value_type const & is null"); return 0; } try { - result = std_vector_Sl_bls_G2Element_Sg__doSet(arg1,arg2,(bls::G2Element const &)*arg3); + result = std_vector_Sl_bls_G2Element_Sg__doSet(arg1,SWIG_STD_MOVE(arg2),(bls::G2Element const &)*arg3); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return 0; } - *(std::vector< bls::G2Element >::value_type **)&jresult = new std::vector< bls::G2Element >::value_type((const std::vector< bls::G2Element >::value_type &)result); + *(std::vector< bls::G2Element >::value_type **)&jresult = new std::vector< bls::G2Element >::value_type(result); return jresult; } @@ -2130,7 +2223,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2ElementVector_1doRemove arg2 = jarg2; arg3 = jarg3; try { - std_vector_Sl_bls_G2Element_Sg__doRemoveRange(arg1,arg2,arg3); + std_vector_Sl_bls_G2Element_Sg__doRemoveRange(arg1,SWIG_STD_MOVE(arg2),SWIG_STD_MOVE(arg3)); } catch(std::out_of_range &_e) { SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, (&_e)->what()); return ; @@ -2236,7 +2329,49 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_BLS_1init(JNIEnv *jen } -SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_BLS_1checkRelicErrors(JNIEnv *jenv, jclass jcls) { +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_BLS_1checkRelicErrors_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jboolean jarg1) { + bool arg1 ; + + (void)jenv; + (void)jcls; + arg1 = jarg1 ? true : false; + { + try { + bls::BLS::CheckRelicErrors(arg1); + } catch(std::string x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return ; + }; + } catch(std::runtime_error x) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, x.what()); return ; + }; + } catch(std::invalid_argument x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; + }; + } catch(std::length_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; + }; + } catch(std::logic_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; + }; + } catch(std::exception x) { + { + SWIG_JavaException(jenv, SWIG_SystemError, x.what()); return ; + }; + } catch(...) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, "Unknown exception"); return ; + }; + } + } +} + + +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_BLS_1checkRelicErrors_1_1SWIG_11(JNIEnv *jenv, jclass jcls) { (void)jenv; (void)jcls; { @@ -2463,7 +2598,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ChainCode_1fromBytes(JNI }; } } - *(bls::ChainCode **)&jresult = new bls::ChainCode((const bls::ChainCode &)result); + *(bls::ChainCode **)&jresult = new bls::ChainCode(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -2481,7 +2616,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1ChainCode_1_1SWIG_1 (void)jarg1_; arg1 = *(bls::ChainCode **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ChainCode const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ChainCode const & is null"); return 0; } { @@ -2534,12 +2669,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_ (void)jarg2_; arg1 = *(bls::ChainCode **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ChainCode const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ChainCode const & is null"); return 0; } arg2 = *(bls::ChainCode **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ChainCode const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ChainCode const & is null"); return 0; } { @@ -2839,7 +2974,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytes_1_1 arg2 = jarg2 ? true : false; { try { - result = bls::G1Element::FromBytes(arg1,arg2); + result = bls::G1Element::FromBytes(SWIG_STD_MOVE(arg1),arg2); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -2870,7 +3005,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytes_1_1 }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -2891,7 +3026,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytes_1_1 { try { - result = bls::G1Element::FromBytes(arg1); + result = bls::G1Element::FromBytes(SWIG_STD_MOVE(arg1)); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -2922,7 +3057,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytes_1_1 }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -2945,7 +3080,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytesUnch arg2 = jarg2 ? true : false; { try { - result = bls::G1Element::FromBytesUnchecked(arg1,arg2); + result = bls::G1Element::FromBytesUnchecked(SWIG_STD_MOVE(arg1),arg2); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -2976,7 +3111,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytesUnch }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -2997,7 +3132,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytesUnch { try { - result = bls::G1Element::FromBytesUnchecked(arg1); + result = bls::G1Element::FromBytesUnchecked(SWIG_STD_MOVE(arg1)); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -3028,7 +3163,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromBytesUnch }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -3055,7 +3190,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromMessage(J arg3 = (int)jarg3; { try { - result = bls::G1Element::FromMessage(arg1,(unsigned char const *)arg2,arg3); + result = bls::G1Element::FromMessage(SWIG_STD_MOVE(arg1),(unsigned char const *)arg2,arg3); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -3086,7 +3221,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1fromMessage(J }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -3137,7 +3272,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1generator(JNI }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -3274,7 +3409,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1negate(JNIEnv }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -3292,7 +3427,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1pair(JNIEnv * arg1 = *(bls::G1Element **)&jarg1; arg2 = *(bls::G2Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -3328,7 +3463,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1pair(JNIEnv * }; } } - *(bls::GTElement **)&jresult = new bls::GTElement((const bls::GTElement &)result); + *(bls::GTElement **)&jresult = new bls::GTElement(result); return jresult; } @@ -3533,6 +3668,53 @@ SWIGEXPORT jbyteArray JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1serializ } +SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G1Element_1copy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + bls::G1Element *arg1 = (bls::G1Element *) 0 ; + bls::G1Element result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(bls::G1Element **)&jarg1; + { + try { + result = (arg1)->Copy(); + } catch(std::string x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; + }; + } catch(std::runtime_error x) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, x.what()); return 0; + }; + } catch(std::invalid_argument x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return 0; + }; + } catch(std::length_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return 0; + }; + } catch(std::logic_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return 0; + }; + } catch(std::exception x) { + { + SWIG_JavaException(jenv, SWIG_SystemError, x.what()); return 0; + }; + } catch(...) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, "Unknown exception"); return 0; + }; + } + } + *(bls::G1Element **)&jresult = new bls::G1Element(result); + return jresult; +} + + SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; bls::G1Element *arg1 = 0 ; @@ -3545,12 +3727,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_ (void)jarg2_; arg1 = *(bls::G1Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } { @@ -3603,12 +3785,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_add_1_1SWIG_10(JNIEnv *j (void)jarg2_; arg1 = *(bls::G1Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } { @@ -3644,7 +3826,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_add_1_1SWIG_10(JNIEnv *j }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -3661,12 +3843,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_andOperator(JNIEnv *jenv (void)jarg2_; arg1 = *(bls::G1Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } arg2 = *(bls::G2Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -3702,7 +3884,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_andOperator(JNIEnv *jenv }; } } - *(bls::GTElement **)&jresult = new bls::GTElement((const bls::GTElement &)result); + *(bls::GTElement **)&jresult = new bls::GTElement(result); return jresult; } @@ -3717,7 +3899,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G1Element_1_1SWIG_1 (void)jarg1_; arg1 = *(bls::G1Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } { @@ -3871,7 +4053,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytes_1_1 arg2 = jarg2 ? true : false; { try { - result = bls::G2Element::FromBytes(arg1,arg2); + result = bls::G2Element::FromBytes(SWIG_STD_MOVE(arg1),arg2); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -3902,7 +4084,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytes_1_1 }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -3923,7 +4105,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytes_1_1 { try { - result = bls::G2Element::FromBytes(arg1); + result = bls::G2Element::FromBytes(SWIG_STD_MOVE(arg1)); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -3954,7 +4136,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytes_1_1 }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -3977,7 +4159,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytesUnch arg2 = jarg2 ? true : false; { try { - result = bls::G2Element::FromBytesUnchecked(arg1,arg2); + result = bls::G2Element::FromBytesUnchecked(SWIG_STD_MOVE(arg1),arg2); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -4008,7 +4190,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytesUnch }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -4029,7 +4211,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytesUnch { try { - result = bls::G2Element::FromBytesUnchecked(arg1); + result = bls::G2Element::FromBytesUnchecked(SWIG_STD_MOVE(arg1)); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -4060,7 +4242,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromBytesUnch }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -4089,7 +4271,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromMessage_1 arg4 = jarg4 ? true : false; { try { - result = bls::G2Element::FromMessage(arg1,(unsigned char const *)arg2,arg3,arg4); + result = bls::G2Element::FromMessage(SWIG_STD_MOVE(arg1),(unsigned char const *)arg2,arg3,arg4); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -4120,7 +4302,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromMessage_1 }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -4151,7 +4333,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromMessage_1 arg3 = (int)jarg3; { try { - result = bls::G2Element::FromMessage(arg1,(unsigned char const *)arg2,arg3); + result = bls::G2Element::FromMessage(SWIG_STD_MOVE(arg1),(unsigned char const *)arg2,arg3); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -4182,7 +4364,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1fromMessage_1 }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -4233,7 +4415,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1generator(JNI }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -4370,7 +4552,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1negate(JNIEnv }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -4388,7 +4570,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1pair(JNIEnv * arg1 = *(bls::G2Element **)&jarg1; arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } { @@ -4424,7 +4606,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1pair(JNIEnv * }; } } - *(bls::GTElement **)&jresult = new bls::GTElement((const bls::GTElement &)result); + *(bls::GTElement **)&jresult = new bls::GTElement(result); return jresult; } @@ -4533,6 +4715,53 @@ SWIGEXPORT jbyteArray JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1serializ } +SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_G2Element_1copy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { + jlong jresult = 0 ; + bls::G2Element *arg1 = (bls::G2Element *) 0 ; + bls::G2Element result; + + (void)jenv; + (void)jcls; + (void)jarg1_; + arg1 = *(bls::G2Element **)&jarg1; + { + try { + result = (arg1)->Copy(); + } catch(std::string x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; + }; + } catch(std::runtime_error x) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, x.what()); return 0; + }; + } catch(std::invalid_argument x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return 0; + }; + } catch(std::length_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return 0; + }; + } catch(std::logic_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return 0; + }; + } catch(std::exception x) { + { + SWIG_JavaException(jenv, SWIG_SystemError, x.what()); return 0; + }; + } catch(...) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, "Unknown exception"); return 0; + }; + } + } + *(bls::G2Element **)&jresult = new bls::G2Element(result); + return jresult; +} + + SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) { jboolean jresult = 0 ; bls::G2Element *arg1 = 0 ; @@ -4545,12 +4774,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_ (void)jarg2_; arg1 = *(bls::G2Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } arg2 = *(bls::G2Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -4603,12 +4832,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_add_1_1SWIG_11(JNIEnv *j (void)jarg2_; arg1 = *(bls::G2Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } arg2 = *(bls::G2Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -4644,7 +4873,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_add_1_1SWIG_11(JNIEnv *j }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -4659,7 +4888,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1G2Element_1_1SWIG_1 (void)jarg1_; arg1 = *(bls::G2Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -4767,7 +4996,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_GTElement_1fromBytes(JNI { try { - result = bls::GTElement::FromBytes(arg1); + result = bls::GTElement::FromBytes(SWIG_STD_MOVE(arg1)); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -4798,7 +5027,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_GTElement_1fromBytes(JNI }; } } - *(bls::GTElement **)&jresult = new bls::GTElement((const bls::GTElement &)result); + *(bls::GTElement **)&jresult = new bls::GTElement(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -4819,7 +5048,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_GTElement_1fromBytesUnch { try { - result = bls::GTElement::FromBytesUnchecked(arg1); + result = bls::GTElement::FromBytesUnchecked(SWIG_STD_MOVE(arg1)); } catch(std::string x) { { SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return 0; @@ -4850,7 +5079,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_GTElement_1fromBytesUnch }; } } - *(bls::GTElement **)&jresult = new bls::GTElement((const bls::GTElement &)result); + *(bls::GTElement **)&jresult = new bls::GTElement(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) (&arg1)->begin(), 0); } @@ -4897,7 +5126,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_GTElement_1unity(JNIEnv }; } } - *(bls::GTElement **)&jresult = new bls::GTElement((const bls::GTElement &)result); + *(bls::GTElement **)&jresult = new bls::GTElement(result); return jresult; } @@ -5016,12 +5245,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_ (void)jarg2_; arg1 = *(bls::GTElement **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement const & is null"); return 0; } arg2 = *(bls::GTElement **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement const & is null"); return 0; } { @@ -5074,12 +5303,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_10(JNIE (void)jarg2_; arg1 = *(bls::GTElement **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement & is null"); return 0; } arg2 = *(bls::GTElement **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::GTElement & is null"); return 0; } { @@ -5115,7 +5344,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_10(JNIE }; } } - *(bls::GTElement **)&jresult = new bls::GTElement((const bls::GTElement &)result); + *(bls::GTElement **)&jresult = new bls::GTElement(result); return jresult; } @@ -5218,7 +5447,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1fromSeedBIP3 }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -5265,7 +5494,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1randomPrivat }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -5316,7 +5545,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1fromBytes_1_ }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -5368,7 +5597,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1fromBytes_1_ }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -5386,7 +5615,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1aggregate(JN (void)jarg1_; arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & is null"); return 0; } { @@ -5422,7 +5651,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1aggregate(JN }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -5481,7 +5710,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1PrivateKey_1_1SWIG_ (void)jarg1_; arg1 = *(bls::PrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -5671,7 +5900,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1getG2Power(J arg1 = *(bls::PrivateKey **)&jarg1; arg2 = *(bls::G2Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -5707,7 +5936,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1getG2Power(J }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -5771,12 +6000,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_ (void)jarg2_; arg1 = *(bls::PrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -5829,12 +6058,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_11(JNIE (void)jarg2_; arg1 = *(bls::G1Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -5870,7 +6099,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_11(JNIE }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -5887,12 +6116,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_12(JNIE (void)jarg2_; arg1 = *(bls::PrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } { @@ -5928,7 +6157,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_12(JNIE }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -5945,12 +6174,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_13(JNIE (void)jarg2_; arg1 = *(bls::G2Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -5986,7 +6215,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_13(JNIE }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -6003,12 +6232,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_14(JNIE (void)jarg2_; arg1 = *(bls::PrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } arg2 = *(bls::G2Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -6044,7 +6273,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_multiply_1_1SWIG_14(JNIE }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -6260,7 +6489,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1signG2_1_1SW }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2, 0); } @@ -6327,7 +6556,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1signG2_1_1SW }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2, 0); } @@ -6387,13 +6616,13 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_PrivateKey_1hasKeyDat } -SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1VERSION_1get(JNIEnv *jenv, jclass jcls) { +SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1REVISION_1get(JNIEnv *jenv, jclass jcls) { jlong jresult = 0 ; unsigned int result; (void)jenv; (void)jcls; - result = (unsigned int)bls::ExtendedPublicKey::VERSION; + result = (unsigned int)bls::ExtendedPublicKey::REVISION; jresult = (jlong)result; return jresult; } @@ -6457,7 +6686,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1fromB }; } } - *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey((const bls::ExtendedPublicKey &)result); + *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -6509,7 +6738,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1fromB }; } } - *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey((const bls::ExtendedPublicKey &)result); + *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -6563,7 +6792,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1publi }; } } - *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey((const bls::ExtendedPublicKey &)result); + *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey(result); return jresult; } @@ -6612,7 +6841,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1publi }; } } - *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey((const bls::ExtendedPublicKey &)result); + *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey(result); return jresult; } @@ -6847,7 +7076,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1getCh }; } } - *(bls::ChainCode **)&jresult = new bls::ChainCode((const bls::ChainCode &)result); + *(bls::ChainCode **)&jresult = new bls::ChainCode(result); return jresult; } @@ -6894,7 +7123,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPublicKey_1getPu }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -6911,12 +7140,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_ (void)jarg2_; arg1 = *(bls::ExtendedPublicKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPublicKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPublicKey const & is null"); return 0; } arg2 = *(bls::ExtendedPublicKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPublicKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPublicKey const & is null"); return 0; } { @@ -7307,7 +7536,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1from }; } } - *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey((const bls::ExtendedPrivateKey &)result); + *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -7359,7 +7588,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1from }; } } - *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey((const bls::ExtendedPrivateKey &)result); + *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -7413,7 +7642,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1priv }; } } - *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey((const bls::ExtendedPrivateKey &)result); + *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey(result); return jresult; } @@ -7462,7 +7691,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1priv }; } } - *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey((const bls::ExtendedPrivateKey &)result); + *(bls::ExtendedPrivateKey **)&jresult = new bls::ExtendedPrivateKey(result); return jresult; } @@ -7511,7 +7740,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1publ }; } } - *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey((const bls::ExtendedPublicKey &)result); + *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey(result); return jresult; } @@ -7746,7 +7975,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1getC }; } } - *(bls::ChainCode **)&jresult = new bls::ChainCode((const bls::ChainCode &)result); + *(bls::ChainCode **)&jresult = new bls::ChainCode(result); return jresult; } @@ -7793,7 +8022,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1getP }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -7840,7 +8069,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1getP }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -7889,7 +8118,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1getE }; } } - *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey((const bls::ExtendedPublicKey &)result); + *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey(result); return jresult; } @@ -7936,7 +8165,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_ExtendedPrivateKey_1getE }; } } - *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey((const bls::ExtendedPublicKey &)result); + *(bls::ExtendedPublicKey **)&jresult = new bls::ExtendedPublicKey(result); return jresult; } @@ -7953,12 +8182,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_objectEquals_1_1SWIG_ (void)jarg2_; arg1 = *(bls::ExtendedPrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPrivateKey const & is null"); return 0; } arg2 = *(bls::ExtendedPrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::ExtendedPrivateKey const & is null"); return 0; } { @@ -8243,7 +8472,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1keyGen(JNIEnv *j }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); { jenv->ReleaseByteArrayElements(jarg1, (jbyte *) arg1->begin(), 0); } @@ -8332,7 +8561,7 @@ SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1parentSkToLamport } arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return ; } arg3 = (uint32_t)jarg3; @@ -8387,7 +8616,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildSk(JN (void)jarg1_; arg1 = *(bls::PrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } arg2 = (uint32_t)jarg2; @@ -8424,7 +8653,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildSk(JN }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -8440,7 +8669,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildSkUnh (void)jarg1_; arg1 = *(bls::PrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } arg2 = (uint32_t)jarg2; @@ -8477,7 +8706,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildSkUnh }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -8493,7 +8722,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildG1Unh (void)jarg1_; arg1 = *(bls::G1Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } arg2 = (uint32_t)jarg2; @@ -8530,7 +8759,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildG1Unh }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -8546,7 +8775,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildG2Unh (void)jarg1_; arg1 = *(bls::G2Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } arg2 = (uint32_t)jarg2; @@ -8583,7 +8812,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_HDKeys_1deriveChildG2Unh }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -9042,6 +9271,48 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_new_1CoreMPL(JNIEnv *jen } +SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_delete_1CoreMPL(JNIEnv *jenv, jclass jcls, jlong jarg1) { + bls::CoreMPL *arg1 = (bls::CoreMPL *) 0 ; + + (void)jenv; + (void)jcls; + arg1 = *(bls::CoreMPL **)&jarg1; + { + try { + delete arg1; + } catch(std::string x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return ; + }; + } catch(std::runtime_error x) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, x.what()); return ; + }; + } catch(std::invalid_argument x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; + }; + } catch(std::length_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; + }; + } catch(std::logic_error x) { + { + SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; + }; + } catch(std::exception x) { + { + SWIG_JavaException(jenv, SWIG_SystemError, x.what()); return ; + }; + } catch(...) { + { + SWIG_JavaException(jenv, SWIG_RuntimeError, "Unknown exception"); return ; + }; + } + } +} + + SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1keyGen(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2) { jlong jresult = 0 ; bls::CoreMPL *arg1 = (bls::CoreMPL *) 0 ; @@ -9089,7 +9360,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1keyGen(JNIEnv * }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); { jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2->begin(), 0); } @@ -9110,7 +9381,7 @@ SWIGEXPORT jbyteArray JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1skToPk(JNI arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -9168,7 +9439,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1skToG1(JNIEnv * arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -9204,7 +9475,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1skToG1(JNIEnv * }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -9223,7 +9494,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1sign(JNIEnv *je arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } @@ -9263,7 +9534,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1sign(JNIEnv *je }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg3, (jbyte *) arg3->begin(), 0); } @@ -9358,7 +9629,7 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1verify_1_1SW arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } @@ -9367,7 +9638,7 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1verify_1_1SW arg4 = *(bls::G2Element **)&jarg4; if (!arg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -9424,7 +9695,7 @@ SWIGEXPORT jbyteArray JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregate_ arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(vector< vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } { @@ -9482,7 +9753,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregate_1_1SW arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(vector< bls::G2Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G2Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G2Element > const & is null"); return 0; } { @@ -9518,7 +9789,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregate_1_1SW }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -9536,7 +9807,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregate_1_1SW arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & is null"); return 0; } { @@ -9572,7 +9843,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregate_1_1SW }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -9593,12 +9864,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregateSecure arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(std::vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & is null"); return 0; } arg3 = *(std::vector< bls::G2Element > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & is null"); return 0; } @@ -9638,7 +9909,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregateSecure }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg4, (jbyte *) arg4->begin(), 0); } @@ -9662,12 +9933,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1verifySecure arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(std::vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & is null"); return 0; } arg3 = *(bls::G2Element **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } @@ -9732,12 +10003,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregateVer arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(vector< vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } arg3 = *(vector< vector< uint8_t > > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } { @@ -9807,17 +10078,17 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1aggregateVer arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & is null"); return 0; } arg3 = *(vector< vector< uint8_t > > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } arg4 = *(bls::G2Element **)&jarg4; if (!arg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -9872,7 +10143,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1deriveChildSk(J arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } arg3 = (uint32_t)jarg3; @@ -9909,7 +10180,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1deriveChildSk(J }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -9928,7 +10199,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1deriveChildSkUn arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } arg3 = (uint32_t)jarg3; @@ -9965,7 +10236,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1deriveChildSkUn }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -9984,7 +10255,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1deriveChildPkUn arg1 = *(bls::CoreMPL **)&jarg1; arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } arg3 = (uint32_t)jarg3; @@ -10021,53 +10292,11 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_CoreMPL_1deriveChildPkUn }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } -SWIGEXPORT void JNICALL Java_org_dashj_bls_DASHJBLSJNI_delete_1CoreMPL(JNIEnv *jenv, jclass jcls, jlong jarg1) { - bls::CoreMPL *arg1 = (bls::CoreMPL *) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(bls::CoreMPL **)&jarg1; - { - try { - delete arg1; - } catch(std::string x) { - { - SWIG_JavaException(jenv, SWIG_ValueError, x.c_str()); return ; - }; - } catch(std::runtime_error x) { - { - SWIG_JavaException(jenv, SWIG_RuntimeError, x.what()); return ; - }; - } catch(std::invalid_argument x) { - { - SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; - }; - } catch(std::length_error x) { - { - SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; - }; - } catch(std::logic_error x) { - { - SWIG_JavaException(jenv, SWIG_ValueError, x.what()); return ; - }; - } catch(std::exception x) { - { - SWIG_JavaException(jenv, SWIG_SystemError, x.what()); return ; - }; - } catch(...) { - { - SWIG_JavaException(jenv, SWIG_RuntimeError, "Unknown exception"); return ; - }; - } - } -} - - SWIGEXPORT jstring JNICALL Java_org_dashj_bls_DASHJBLSJNI_BasicSchemeMPL_1CIPHERSUITE_1ID_1get(JNIEnv *jenv, jclass jcls) { jstring jresult = 0 ; std::string *result = 0 ; @@ -10141,12 +10370,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_BasicSchemeMPL_1aggre arg1 = *(bls::BasicSchemeMPL **)&jarg1; arg2 = *(vector< vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } arg3 = *(vector< vector< uint8_t > > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } { @@ -10216,17 +10445,17 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_BasicSchemeMPL_1aggre arg1 = *(bls::BasicSchemeMPL **)&jarg1; arg2 = *(vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & is null"); return 0; } arg3 = *(vector< vector< uint8_t > > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } arg4 = *(bls::G2Element **)&jarg4; if (!arg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -10379,7 +10608,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_AugSchemeMPL_1sign_1_1SW arg1 = *(bls::AugSchemeMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } @@ -10419,7 +10648,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_AugSchemeMPL_1sign_1_1SW }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg3, (jbyte *) arg3->begin(), 0); } @@ -10443,7 +10672,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_AugSchemeMPL_1sign_1_1SW arg1 = *(bls::AugSchemeMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } @@ -10452,7 +10681,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_AugSchemeMPL_1sign_1_1SW arg4 = *(bls::G1Element **)&jarg4; if (!arg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } { @@ -10488,7 +10717,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_AugSchemeMPL_1sign_1_1SW }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg3, (jbyte *) arg3->begin(), 0); } @@ -10584,12 +10813,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_AugSchemeMPL_1aggrega arg1 = *(bls::AugSchemeMPL **)&jarg1; arg2 = *(vector< vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } arg3 = *(vector< vector< uint8_t > > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } { @@ -10659,17 +10888,17 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_AugSchemeMPL_1aggrega arg1 = *(bls::AugSchemeMPL **)&jarg1; arg2 = *(vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & is null"); return 0; } arg3 = *(vector< vector< uint8_t > > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } arg4 = *(bls::G2Element **)&jarg4; if (!arg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -10833,7 +11062,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PopSchemeMPL_1popProve(J arg1 = *(bls::PopSchemeMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -10869,7 +11098,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_PopSchemeMPL_1popProve(J }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } @@ -10889,12 +11118,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_PopSchemeMPL_1popVeri arg1 = *(bls::PopSchemeMPL **)&jarg1; arg2 = *(bls::G1Element **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } arg3 = *(bls::G2Element **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -11014,7 +11243,7 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_PopSchemeMPL_1fastAgg arg1 = *(bls::PopSchemeMPL **)&jarg1; arg2 = *(vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & is null"); return 0; } @@ -11023,7 +11252,7 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_PopSchemeMPL_1fastAgg arg4 = *(bls::G2Element **)&jarg4; if (!arg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -11084,7 +11313,7 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_PopSchemeMPL_1fastAgg arg1 = *(bls::PopSchemeMPL **)&jarg1; arg2 = *(vector< vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } { @@ -11248,7 +11477,7 @@ SWIGEXPORT jbyteArray JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1sk arg1 = *(bls::LegacySchemeMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } { @@ -11307,7 +11536,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1sign(JN arg1 = *(bls::LegacySchemeMPL **)&jarg1; arg2 = *(bls::PrivateKey **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } @@ -11347,7 +11576,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1sign(JN }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg3, (jbyte *) arg3->begin(), 0); } @@ -11439,7 +11668,7 @@ SWIGEXPORT jbyteArray JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1ag arg1 = *(bls::LegacySchemeMPL **)&jarg1; arg2 = *(vector< vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } { @@ -11500,12 +11729,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1aggrega arg1 = *(bls::LegacySchemeMPL **)&jarg1; arg2 = *(std::vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & is null"); return 0; } arg3 = *(std::vector< bls::G2Element > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & is null"); return 0; } @@ -11545,7 +11774,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1aggrega }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg4, (jbyte *) arg4->begin(), 0); } @@ -11569,12 +11798,12 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1veri arg1 = *(bls::LegacySchemeMPL **)&jarg1; arg2 = *(std::vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & is null"); return 0; } arg3 = *(bls::G2Element **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } @@ -11639,17 +11868,17 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_LegacySchemeMPL_1aggr arg1 = *(bls::LegacySchemeMPL **)&jarg1; arg2 = *(vector< bls::G1Element > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< bls::G1Element > const & is null"); return 0; } arg3 = *(vector< vector< uint8_t > > **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "vector< vector< uint8_t > > const & is null"); return 0; } arg4 = *(bls::G2Element **)&jarg4; if (!arg4) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } result = (bool)bls_LegacySchemeMPL_aggregateVerify(arg1,(vector< bls::G1Element > const &)*arg2,(std::vector< std::vector< unsigned char > > const &)*arg3,(bls::G2Element const &)*arg4); @@ -11711,7 +11940,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_privateKeyShare(JNIEnv * (void)jarg1_; arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & is null"); return 0; } @@ -11751,7 +11980,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_privateKeyShare(JNIEnv * }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); { jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2->begin(), 0); } @@ -11770,7 +11999,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_publicKeyShare(JNIEnv *j (void)jarg1_; arg1 = *(std::vector< bls::G1Element > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & is null"); return 0; } @@ -11810,7 +12039,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_publicKeyShare(JNIEnv *j }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); { jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2->begin(), 0); } @@ -11829,7 +12058,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_signatureShare(JNIEnv *j (void)jarg1_; arg1 = *(std::vector< bls::G2Element > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & is null"); return 0; } @@ -11869,7 +12098,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_signatureShare(JNIEnv *j }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2->begin(), 0); } @@ -11888,7 +12117,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_sign(JNIEnv *jenv, jclas (void)jarg1_; arg1 = *(bls::PrivateKey **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::PrivateKey const & is null"); return 0; } @@ -11928,7 +12157,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_sign(JNIEnv *jenv, jclas }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); { jenv->ReleaseByteArrayElements(jarg2, (jbyte *) arg2->begin(), 0); } @@ -11949,7 +12178,7 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_verify(JNIEnv *jenv, (void)jarg3_; arg1 = *(bls::G1Element **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G1Element const & is null"); return 0; } @@ -11958,7 +12187,7 @@ SWIGEXPORT jboolean JNICALL Java_org_dashj_bls_DASHJBLSJNI_verify(JNIEnv *jenv, arg3 = *(bls::G2Element **)&jarg3; if (!arg3) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "bls::G2Element const & is null"); return 0; } { @@ -12014,12 +12243,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_privateKeyRecover(JNIEnv (void)jarg2_; arg1 = *(std::vector< bls::PrivateKey > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::PrivateKey > const & is null"); return 0; } arg2 = *(std::vector< std::vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & is null"); return 0; } { @@ -12055,7 +12284,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_privateKeyRecover(JNIEnv }; } } - *(bls::PrivateKey **)&jresult = new bls::PrivateKey((const bls::PrivateKey &)result); + *(bls::PrivateKey **)&jresult = new bls::PrivateKey(result); return jresult; } @@ -12072,12 +12301,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_publicKeyRecover(JNIEnv (void)jarg2_; arg1 = *(std::vector< bls::G1Element > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G1Element > const & is null"); return 0; } arg2 = *(std::vector< std::vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & is null"); return 0; } { @@ -12113,7 +12342,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_publicKeyRecover(JNIEnv }; } } - *(bls::G1Element **)&jresult = new bls::G1Element((const bls::G1Element &)result); + *(bls::G1Element **)&jresult = new bls::G1Element(result); return jresult; } @@ -12130,12 +12359,12 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_signatureRecover(JNIEnv (void)jarg2_; arg1 = *(std::vector< bls::G2Element > **)&jarg1; if (!arg1) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< bls::G2Element > const & is null"); return 0; } arg2 = *(std::vector< std::vector< uint8_t > > **)&jarg2; if (!arg2) { - SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & reference is null"); + SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "std::vector< std::vector< uint8_t > > const & is null"); return 0; } { @@ -12171,7 +12400,7 @@ SWIGEXPORT jlong JNICALL Java_org_dashj_bls_DASHJBLSJNI_signatureRecover(JNIEnv }; } } - *(bls::G2Element **)&jresult = new bls::G2Element((const bls::G2Element &)result); + *(bls::G2Element **)&jresult = new bls::G2Element(result); return jresult; } diff --git a/bls/src/main/cpp/threshold-v1.hpp b/bls/src/main/cpp/threshold-v1.hpp index 9434f84..ecaac03 100644 --- a/bls/src/main/cpp/threshold-v1.hpp +++ b/bls/src/main/cpp/threshold-v1.hpp @@ -1,7 +1,7 @@ #ifndef DASHJ_BLS_THRESHOLD_HPP #define DASHJ_BLS_THRESHOLD_HPP -#include "bls-signatures/src/threshold.hpp" +#include "bls-signatures/include/dashbls/threshold.hpp" #include using namespace std; diff --git a/bls/src/main/java/org/dashj/bls/AugSchemeMPL.java b/bls/src/main/java/org/dashj/bls/AugSchemeMPL.java index 10823e3..79054ea 100644 --- a/bls/src/main/java/org/dashj/bls/AugSchemeMPL.java +++ b/bls/src/main/java/org/dashj/bls/AugSchemeMPL.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -20,7 +20,19 @@ protected static long getCPtr(AugSchemeMPL obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(AugSchemeMPL obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/BLS.java b/bls/src/main/java/org/dashj/bls/BLS.java index 40bb65c..3aa2a9e 100644 --- a/bls/src/main/java/org/dashj/bls/BLS.java +++ b/bls/src/main/java/org/dashj/bls/BLS.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(BLS obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(BLS obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -40,8 +52,12 @@ public static boolean init() { return DASHJBLSJNI.BLS_init(); } + public static void checkRelicErrors(boolean should_throw) { + DASHJBLSJNI.BLS_checkRelicErrors__SWIG_0(should_throw); + } + public static void checkRelicErrors() { - DASHJBLSJNI.BLS_checkRelicErrors(); + DASHJBLSJNI.BLS_checkRelicErrors__SWIG_1(); } public static int getContextError() { diff --git a/bls/src/main/java/org/dashj/bls/BLSJniLibrary.java b/bls/src/main/java/org/dashj/bls/BLSJniLibrary.java index 042f5d9..19744b3 100644 --- a/bls/src/main/java/org/dashj/bls/BLSJniLibrary.java +++ b/bls/src/main/java/org/dashj/bls/BLSJniLibrary.java @@ -6,7 +6,7 @@ public class BLSJniLibrary { private static final Logger log = LoggerFactory.getLogger(BLSJniLibrary.class); public static String LIBRARY_NAME = "dashjbls"; - public static String VERSION = "1.2.5-SNAPSHOT"; + public static String VERSION = "1.3.5-SNAPSHOT"; static private boolean isLibraryLoaded = false; diff --git a/bls/src/main/java/org/dashj/bls/BasicSchemeMPL.java b/bls/src/main/java/org/dashj/bls/BasicSchemeMPL.java index d4e5e68..0208f55 100644 --- a/bls/src/main/java/org/dashj/bls/BasicSchemeMPL.java +++ b/bls/src/main/java/org/dashj/bls/BasicSchemeMPL.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -20,7 +20,19 @@ protected static long getCPtr(BasicSchemeMPL obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(BasicSchemeMPL obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/ChainCode.java b/bls/src/main/java/org/dashj/bls/ChainCode.java index a9ba376..c8b0073 100644 --- a/bls/src/main/java/org/dashj/bls/ChainCode.java +++ b/bls/src/main/java/org/dashj/bls/ChainCode.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(ChainCode obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(ChainCode obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/CoreMPL.java b/bls/src/main/java/org/dashj/bls/CoreMPL.java index 415efb2..0a0b979 100644 --- a/bls/src/main/java/org/dashj/bls/CoreMPL.java +++ b/bls/src/main/java/org/dashj/bls/CoreMPL.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(CoreMPL obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(CoreMPL obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/DASHJBLS.java b/bls/src/main/java/org/dashj/bls/DASHJBLS.java index 3a5c633..c790139 100644 --- a/bls/src/main/java/org/dashj/bls/DASHJBLS.java +++ b/bls/src/main/java/org/dashj/bls/DASHJBLS.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ diff --git a/bls/src/main/java/org/dashj/bls/DASHJBLSJNI.java b/bls/src/main/java/org/dashj/bls/DASHJBLSJNI.java index ce2ec70..29970fd 100644 --- a/bls/src/main/java/org/dashj/bls/DASHJBLSJNI.java +++ b/bls/src/main/java/org/dashj/bls/DASHJBLSJNI.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -11,11 +11,11 @@ public class DASHJBLSJNI { public final static native long new_Uint8Vector__SWIG_0(); public final static native long new_Uint8Vector__SWIG_1(long jarg1, Uint8Vector jarg1_); - public final static native int Uint8Vector_capacity(long jarg1, Uint8Vector jarg1_); - public final static native void Uint8Vector_reserve(long jarg1, Uint8Vector jarg1_, int jarg2); public final static native boolean Uint8Vector_isEmpty(long jarg1, Uint8Vector jarg1_); public final static native void Uint8Vector_clear(long jarg1, Uint8Vector jarg1_); public final static native long new_Uint8Vector__SWIG_2(int jarg1, short jarg2); + public final static native int Uint8Vector_doCapacity(long jarg1, Uint8Vector jarg1_); + public final static native void Uint8Vector_doReserve(long jarg1, Uint8Vector jarg1_, int jarg2); public final static native int Uint8Vector_doSize(long jarg1, Uint8Vector jarg1_); public final static native void Uint8Vector_doAdd__SWIG_0(long jarg1, Uint8Vector jarg1_, short jarg2); public final static native void Uint8Vector_doAdd__SWIG_1(long jarg1, Uint8Vector jarg1_, int jarg2, short jarg3); @@ -26,11 +26,11 @@ public class DASHJBLSJNI { public final static native void delete_Uint8Vector(long jarg1); public final static native long new_Uint8VectorVector__SWIG_0(); public final static native long new_Uint8VectorVector__SWIG_1(long jarg1, Uint8VectorVector jarg1_); - public final static native int Uint8VectorVector_capacity(long jarg1, Uint8VectorVector jarg1_); - public final static native void Uint8VectorVector_reserve(long jarg1, Uint8VectorVector jarg1_, int jarg2); public final static native boolean Uint8VectorVector_isEmpty(long jarg1, Uint8VectorVector jarg1_); public final static native void Uint8VectorVector_clear(long jarg1, Uint8VectorVector jarg1_); public final static native long new_Uint8VectorVector__SWIG_2(int jarg1, long jarg2, Uint8Vector jarg2_); + public final static native int Uint8VectorVector_doCapacity(long jarg1, Uint8VectorVector jarg1_); + public final static native void Uint8VectorVector_doReserve(long jarg1, Uint8VectorVector jarg1_, int jarg2); public final static native int Uint8VectorVector_doSize(long jarg1, Uint8VectorVector jarg1_); public final static native void Uint8VectorVector_doAdd__SWIG_0(long jarg1, Uint8VectorVector jarg1_, long jarg2, Uint8Vector jarg2_); public final static native void Uint8VectorVector_doAdd__SWIG_1(long jarg1, Uint8VectorVector jarg1_, int jarg2, long jarg3, Uint8Vector jarg3_); @@ -41,11 +41,11 @@ public class DASHJBLSJNI { public final static native void delete_Uint8VectorVector(long jarg1); public final static native long new_PrivateKeyVector__SWIG_0(); public final static native long new_PrivateKeyVector__SWIG_1(long jarg1, PrivateKeyVector jarg1_); - public final static native int PrivateKeyVector_capacity(long jarg1, PrivateKeyVector jarg1_); - public final static native void PrivateKeyVector_reserve(long jarg1, PrivateKeyVector jarg1_, int jarg2); public final static native boolean PrivateKeyVector_isEmpty(long jarg1, PrivateKeyVector jarg1_); public final static native void PrivateKeyVector_clear(long jarg1, PrivateKeyVector jarg1_); public final static native long new_PrivateKeyVector__SWIG_2(int jarg1, long jarg2, PrivateKey jarg2_); + public final static native int PrivateKeyVector_doCapacity(long jarg1, PrivateKeyVector jarg1_); + public final static native void PrivateKeyVector_doReserve(long jarg1, PrivateKeyVector jarg1_, int jarg2); public final static native int PrivateKeyVector_doSize(long jarg1, PrivateKeyVector jarg1_); public final static native void PrivateKeyVector_doAdd__SWIG_0(long jarg1, PrivateKeyVector jarg1_, long jarg2, PrivateKey jarg2_); public final static native void PrivateKeyVector_doAdd__SWIG_1(long jarg1, PrivateKeyVector jarg1_, int jarg2, long jarg3, PrivateKey jarg3_); @@ -56,11 +56,11 @@ public class DASHJBLSJNI { public final static native void delete_PrivateKeyVector(long jarg1); public final static native long new_G1ElementVector__SWIG_0(); public final static native long new_G1ElementVector__SWIG_1(long jarg1, G1ElementVector jarg1_); - public final static native int G1ElementVector_capacity(long jarg1, G1ElementVector jarg1_); - public final static native void G1ElementVector_reserve(long jarg1, G1ElementVector jarg1_, int jarg2); public final static native boolean G1ElementVector_isEmpty(long jarg1, G1ElementVector jarg1_); public final static native void G1ElementVector_clear(long jarg1, G1ElementVector jarg1_); public final static native long new_G1ElementVector__SWIG_2(int jarg1, long jarg2, G1Element jarg2_); + public final static native int G1ElementVector_doCapacity(long jarg1, G1ElementVector jarg1_); + public final static native void G1ElementVector_doReserve(long jarg1, G1ElementVector jarg1_, int jarg2); public final static native int G1ElementVector_doSize(long jarg1, G1ElementVector jarg1_); public final static native void G1ElementVector_doAdd__SWIG_0(long jarg1, G1ElementVector jarg1_, long jarg2, G1Element jarg2_); public final static native void G1ElementVector_doAdd__SWIG_1(long jarg1, G1ElementVector jarg1_, int jarg2, long jarg3, G1Element jarg3_); @@ -71,11 +71,11 @@ public class DASHJBLSJNI { public final static native void delete_G1ElementVector(long jarg1); public final static native long new_G2ElementVector__SWIG_0(); public final static native long new_G2ElementVector__SWIG_1(long jarg1, G2ElementVector jarg1_); - public final static native int G2ElementVector_capacity(long jarg1, G2ElementVector jarg1_); - public final static native void G2ElementVector_reserve(long jarg1, G2ElementVector jarg1_, int jarg2); public final static native boolean G2ElementVector_isEmpty(long jarg1, G2ElementVector jarg1_); public final static native void G2ElementVector_clear(long jarg1, G2ElementVector jarg1_); public final static native long new_G2ElementVector__SWIG_2(int jarg1, long jarg2, G2Element jarg2_); + public final static native int G2ElementVector_doCapacity(long jarg1, G2ElementVector jarg1_); + public final static native void G2ElementVector_doReserve(long jarg1, G2ElementVector jarg1_, int jarg2); public final static native int G2ElementVector_doSize(long jarg1, G2ElementVector jarg1_); public final static native void G2ElementVector_doAdd__SWIG_0(long jarg1, G2ElementVector jarg1_, long jarg2, G2Element jarg2_); public final static native void G2ElementVector_doAdd__SWIG_1(long jarg1, G2ElementVector jarg1_, int jarg2, long jarg3, G2Element jarg3_); @@ -86,7 +86,8 @@ public class DASHJBLSJNI { public final static native void delete_G2ElementVector(long jarg1); public final static native int BLS_MESSAGE_HASH_LEN_get(); public final static native boolean BLS_init(); - public final static native void BLS_checkRelicErrors(); + public final static native void BLS_checkRelicErrors__SWIG_0(boolean jarg1); + public final static native void BLS_checkRelicErrors__SWIG_1(); public final static native int BLS_RLC_OK_get(); public final static native int BLS_getContextError(); public final static native void BLS_setContextError(int jarg1); @@ -117,6 +118,7 @@ public class DASHJBLSJNI { public final static native long G1Element_getFingerprint__SWIG_1(long jarg1, G1Element jarg1_); public final static native byte[] G1Element_serialize__SWIG_0(long jarg1, G1Element jarg1_, boolean jarg2); public final static native byte[] G1Element_serialize__SWIG_1(long jarg1, G1Element jarg1_); + public final static native long G1Element_copy(long jarg1, G1Element jarg1_); public final static native boolean objectEquals__SWIG_1(long jarg1, G1Element jarg1_, long jarg2, G1Element jarg2_); public final static native long add__SWIG_0(long jarg1, G1Element jarg1_, long jarg2, G1Element jarg2_); public final static native long andOperator(long jarg1, G1Element jarg1_, long jarg2, G2Element jarg2_); @@ -137,6 +139,7 @@ public class DASHJBLSJNI { public final static native long G2Element_pair(long jarg1, G2Element jarg1_, long jarg2, G1Element jarg2_); public final static native byte[] G2Element_serialize__SWIG_0(long jarg1, G2Element jarg1_, boolean jarg2); public final static native byte[] G2Element_serialize__SWIG_1(long jarg1, G2Element jarg1_); + public final static native long G2Element_copy(long jarg1, G2Element jarg1_); public final static native boolean objectEquals__SWIG_2(long jarg1, G2Element jarg1_, long jarg2, G2Element jarg2_); public final static native long add__SWIG_1(long jarg1, G2Element jarg1_, long jarg2, G2Element jarg2_); public final static native long new_G2Element__SWIG_1(long jarg1, G2Element jarg1_); @@ -174,7 +177,7 @@ public class DASHJBLSJNI { public final static native long PrivateKey_signG2__SWIG_0(long jarg1, PrivateKey jarg1_, byte[] jarg2, long jarg3, byte[] jarg4, long jarg5, boolean jarg6); public final static native long PrivateKey_signG2__SWIG_1(long jarg1, PrivateKey jarg1_, byte[] jarg2, long jarg3, byte[] jarg4, long jarg5); public final static native boolean PrivateKey_hasKeyData(long jarg1, PrivateKey jarg1_); - public final static native long ExtendedPublicKey_VERSION_get(); + public final static native long ExtendedPublicKey_REVISION_get(); public final static native long ExtendedPublicKey_SIZE_get(); public final static native long ExtendedPublicKey_fromBytes__SWIG_0(byte[] jarg1, boolean jarg2); public final static native long ExtendedPublicKey_fromBytes__SWIG_1(byte[] jarg1); @@ -230,6 +233,7 @@ public class DASHJBLSJNI { public final static native long new_HKDF256(); public final static native void delete_HKDF256(long jarg1); public final static native long new_CoreMPL(String jarg1); + public final static native void delete_CoreMPL(long jarg1); public final static native long CoreMPL_keyGen(long jarg1, CoreMPL jarg1_, byte[] jarg2); public final static native byte[] CoreMPL_skToPk(long jarg1, CoreMPL jarg1_, long jarg2, PrivateKey jarg2_); public final static native long CoreMPL_skToG1(long jarg1, CoreMPL jarg1_, long jarg2, PrivateKey jarg2_); @@ -246,7 +250,6 @@ public class DASHJBLSJNI { public final static native long CoreMPL_deriveChildSk(long jarg1, CoreMPL jarg1_, long jarg2, PrivateKey jarg2_, long jarg3); public final static native long CoreMPL_deriveChildSkUnhardened(long jarg1, CoreMPL jarg1_, long jarg2, PrivateKey jarg2_, long jarg3); public final static native long CoreMPL_deriveChildPkUnhardened(long jarg1, CoreMPL jarg1_, long jarg2, G1Element jarg2_, long jarg3); - public final static native void delete_CoreMPL(long jarg1); public final static native String BasicSchemeMPL_CIPHERSUITE_ID_get(); public final static native long new_BasicSchemeMPL(); public final static native boolean BasicSchemeMPL_aggregateVerify__SWIG_0(long jarg1, BasicSchemeMPL jarg1_, long jarg2, Uint8VectorVector jarg2_, long jarg3, Uint8VectorVector jarg3_, byte[] jarg4); diff --git a/bls/src/main/java/org/dashj/bls/ExtendedPrivateKey.java b/bls/src/main/java/org/dashj/bls/ExtendedPrivateKey.java index f2edb95..941b4bb 100644 --- a/bls/src/main/java/org/dashj/bls/ExtendedPrivateKey.java +++ b/bls/src/main/java/org/dashj/bls/ExtendedPrivateKey.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(ExtendedPrivateKey obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(ExtendedPrivateKey obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/ExtendedPublicKey.java b/bls/src/main/java/org/dashj/bls/ExtendedPublicKey.java index a1a168f..4842166 100644 --- a/bls/src/main/java/org/dashj/bls/ExtendedPublicKey.java +++ b/bls/src/main/java/org/dashj/bls/ExtendedPublicKey.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(ExtendedPublicKey obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(ExtendedPublicKey obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -92,6 +104,6 @@ public ExtendedPublicKey() { this(DASHJBLSJNI.new_ExtendedPublicKey(), true); } - public final static long VERSION = DASHJBLSJNI.ExtendedPublicKey_VERSION_get(); + public final static long REVISION = DASHJBLSJNI.ExtendedPublicKey_REVISION_get(); public final static long SIZE = DASHJBLSJNI.ExtendedPublicKey_SIZE_get(); } diff --git a/bls/src/main/java/org/dashj/bls/G1Element.java b/bls/src/main/java/org/dashj/bls/G1Element.java index 71e9a07..d3aeb5c 100644 --- a/bls/src/main/java/org/dashj/bls/G1Element.java +++ b/bls/src/main/java/org/dashj/bls/G1Element.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(G1Element obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(G1Element obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -92,6 +104,10 @@ public long getFingerprint() { public byte[] serialize() { return DASHJBLSJNI.G1Element_serialize__SWIG_1(swigCPtr, this); } + public G1Element copy() { + return new G1Element(DASHJBLSJNI.G1Element_copy(swigCPtr, this), true); + } + public G1Element(G1Element other) { this(DASHJBLSJNI.new_G1Element__SWIG_1(G1Element.getCPtr(other), other), true); } diff --git a/bls/src/main/java/org/dashj/bls/G1ElementVector.java b/bls/src/main/java/org/dashj/bls/G1ElementVector.java index fe84e6c..99fb6f3 100644 --- a/bls/src/main/java/org/dashj/bls/G1ElementVector.java +++ b/bls/src/main/java/org/dashj/bls/G1ElementVector.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(G1ElementVector obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(G1ElementVector obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -85,20 +97,20 @@ public int size() { return doSize(); } - public G1ElementVector() { - this(DASHJBLSJNI.new_G1ElementVector__SWIG_0(), true); + public int capacity() { + return doCapacity(); } - public G1ElementVector(G1ElementVector other) { - this(DASHJBLSJNI.new_G1ElementVector__SWIG_1(G1ElementVector.getCPtr(other), other), true); + public void reserve(int n) { + doReserve(n); } - public int capacity() { - return DASHJBLSJNI.G1ElementVector_capacity(swigCPtr, this); + public G1ElementVector() { + this(DASHJBLSJNI.new_G1ElementVector__SWIG_0(), true); } - public void reserve(int n) { - DASHJBLSJNI.G1ElementVector_reserve(swigCPtr, this, n); + public G1ElementVector(G1ElementVector other) { + this(DASHJBLSJNI.new_G1ElementVector__SWIG_1(G1ElementVector.getCPtr(other), other), true); } public boolean isEmpty() { @@ -113,6 +125,14 @@ public G1ElementVector(int count, G1Element value) { this(DASHJBLSJNI.new_G1ElementVector__SWIG_2(count, G1Element.getCPtr(value), value), true); } + private int doCapacity() { + return DASHJBLSJNI.G1ElementVector_doCapacity(swigCPtr, this); + } + + private void doReserve(int n) { + DASHJBLSJNI.G1ElementVector_doReserve(swigCPtr, this, n); + } + private int doSize() { return DASHJBLSJNI.G1ElementVector_doSize(swigCPtr, this); } diff --git a/bls/src/main/java/org/dashj/bls/G2Element.java b/bls/src/main/java/org/dashj/bls/G2Element.java index 9f7fb6e..82ca943 100644 --- a/bls/src/main/java/org/dashj/bls/G2Element.java +++ b/bls/src/main/java/org/dashj/bls/G2Element.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(G2Element obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(G2Element obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -88,6 +100,10 @@ public GTElement pair(G1Element a) { public byte[] serialize() { return DASHJBLSJNI.G2Element_serialize__SWIG_1(swigCPtr, this); } + public G2Element copy() { + return new G2Element(DASHJBLSJNI.G2Element_copy(swigCPtr, this), true); + } + public G2Element(G2Element other) { this(DASHJBLSJNI.new_G2Element__SWIG_1(G2Element.getCPtr(other), other), true); } diff --git a/bls/src/main/java/org/dashj/bls/G2ElementVector.java b/bls/src/main/java/org/dashj/bls/G2ElementVector.java index 97408d3..6724d4e 100644 --- a/bls/src/main/java/org/dashj/bls/G2ElementVector.java +++ b/bls/src/main/java/org/dashj/bls/G2ElementVector.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(G2ElementVector obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(G2ElementVector obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -85,20 +97,20 @@ public int size() { return doSize(); } - public G2ElementVector() { - this(DASHJBLSJNI.new_G2ElementVector__SWIG_0(), true); + public int capacity() { + return doCapacity(); } - public G2ElementVector(G2ElementVector other) { - this(DASHJBLSJNI.new_G2ElementVector__SWIG_1(G2ElementVector.getCPtr(other), other), true); + public void reserve(int n) { + doReserve(n); } - public int capacity() { - return DASHJBLSJNI.G2ElementVector_capacity(swigCPtr, this); + public G2ElementVector() { + this(DASHJBLSJNI.new_G2ElementVector__SWIG_0(), true); } - public void reserve(int n) { - DASHJBLSJNI.G2ElementVector_reserve(swigCPtr, this, n); + public G2ElementVector(G2ElementVector other) { + this(DASHJBLSJNI.new_G2ElementVector__SWIG_1(G2ElementVector.getCPtr(other), other), true); } public boolean isEmpty() { @@ -113,6 +125,14 @@ public G2ElementVector(int count, G2Element value) { this(DASHJBLSJNI.new_G2ElementVector__SWIG_2(count, G2Element.getCPtr(value), value), true); } + private int doCapacity() { + return DASHJBLSJNI.G2ElementVector_doCapacity(swigCPtr, this); + } + + private void doReserve(int n) { + DASHJBLSJNI.G2ElementVector_doReserve(swigCPtr, this, n); + } + private int doSize() { return DASHJBLSJNI.G2ElementVector_doSize(swigCPtr, this); } diff --git a/bls/src/main/java/org/dashj/bls/GTElement.java b/bls/src/main/java/org/dashj/bls/GTElement.java index 2d6832d..11c34f3 100644 --- a/bls/src/main/java/org/dashj/bls/GTElement.java +++ b/bls/src/main/java/org/dashj/bls/GTElement.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(GTElement obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(GTElement obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/HDKeys.java b/bls/src/main/java/org/dashj/bls/HDKeys.java index 81037cc..741eaf6 100644 --- a/bls/src/main/java/org/dashj/bls/HDKeys.java +++ b/bls/src/main/java/org/dashj/bls/HDKeys.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(HDKeys obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(HDKeys obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/HKDF256.java b/bls/src/main/java/org/dashj/bls/HKDF256.java index ec071c2..a20c380 100644 --- a/bls/src/main/java/org/dashj/bls/HKDF256.java +++ b/bls/src/main/java/org/dashj/bls/HKDF256.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(HKDF256 obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(HKDF256 obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/LegacySchemeMPL.java b/bls/src/main/java/org/dashj/bls/LegacySchemeMPL.java index 3348654..96c2058 100644 --- a/bls/src/main/java/org/dashj/bls/LegacySchemeMPL.java +++ b/bls/src/main/java/org/dashj/bls/LegacySchemeMPL.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -20,7 +20,19 @@ protected static long getCPtr(LegacySchemeMPL obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(LegacySchemeMPL obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/PopSchemeMPL.java b/bls/src/main/java/org/dashj/bls/PopSchemeMPL.java index 52eb1b8..f4131b6 100644 --- a/bls/src/main/java/org/dashj/bls/PopSchemeMPL.java +++ b/bls/src/main/java/org/dashj/bls/PopSchemeMPL.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -20,7 +20,19 @@ protected static long getCPtr(PopSchemeMPL obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(PopSchemeMPL obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/PrivateKey.java b/bls/src/main/java/org/dashj/bls/PrivateKey.java index 85c4d35..957ee40 100644 --- a/bls/src/main/java/org/dashj/bls/PrivateKey.java +++ b/bls/src/main/java/org/dashj/bls/PrivateKey.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(PrivateKey obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(PrivateKey obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } diff --git a/bls/src/main/java/org/dashj/bls/PrivateKeyVector.java b/bls/src/main/java/org/dashj/bls/PrivateKeyVector.java index cc1a91f..5938874 100644 --- a/bls/src/main/java/org/dashj/bls/PrivateKeyVector.java +++ b/bls/src/main/java/org/dashj/bls/PrivateKeyVector.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(PrivateKeyVector obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(PrivateKeyVector obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -85,20 +97,20 @@ public int size() { return doSize(); } - public PrivateKeyVector() { - this(DASHJBLSJNI.new_PrivateKeyVector__SWIG_0(), true); + public int capacity() { + return doCapacity(); } - public PrivateKeyVector(PrivateKeyVector other) { - this(DASHJBLSJNI.new_PrivateKeyVector__SWIG_1(PrivateKeyVector.getCPtr(other), other), true); + public void reserve(int n) { + doReserve(n); } - public int capacity() { - return DASHJBLSJNI.PrivateKeyVector_capacity(swigCPtr, this); + public PrivateKeyVector() { + this(DASHJBLSJNI.new_PrivateKeyVector__SWIG_0(), true); } - public void reserve(int n) { - DASHJBLSJNI.PrivateKeyVector_reserve(swigCPtr, this, n); + public PrivateKeyVector(PrivateKeyVector other) { + this(DASHJBLSJNI.new_PrivateKeyVector__SWIG_1(PrivateKeyVector.getCPtr(other), other), true); } public boolean isEmpty() { @@ -113,6 +125,14 @@ public PrivateKeyVector(int count, PrivateKey value) { this(DASHJBLSJNI.new_PrivateKeyVector__SWIG_2(count, PrivateKey.getCPtr(value), value), true); } + private int doCapacity() { + return DASHJBLSJNI.PrivateKeyVector_doCapacity(swigCPtr, this); + } + + private void doReserve(int n) { + DASHJBLSJNI.PrivateKeyVector_doReserve(swigCPtr, this, n); + } + private int doSize() { return DASHJBLSJNI.PrivateKeyVector_doSize(swigCPtr, this); } diff --git a/bls/src/main/java/org/dashj/bls/Uint8Vector.java b/bls/src/main/java/org/dashj/bls/Uint8Vector.java index 32845f5..0fc7a53 100644 --- a/bls/src/main/java/org/dashj/bls/Uint8Vector.java +++ b/bls/src/main/java/org/dashj/bls/Uint8Vector.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(Uint8Vector obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(Uint8Vector obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -85,20 +97,20 @@ public int size() { return doSize(); } - public Uint8Vector() { - this(DASHJBLSJNI.new_Uint8Vector__SWIG_0(), true); + public int capacity() { + return doCapacity(); } - public Uint8Vector(Uint8Vector other) { - this(DASHJBLSJNI.new_Uint8Vector__SWIG_1(Uint8Vector.getCPtr(other), other), true); + public void reserve(int n) { + doReserve(n); } - public int capacity() { - return DASHJBLSJNI.Uint8Vector_capacity(swigCPtr, this); + public Uint8Vector() { + this(DASHJBLSJNI.new_Uint8Vector__SWIG_0(), true); } - public void reserve(int n) { - DASHJBLSJNI.Uint8Vector_reserve(swigCPtr, this, n); + public Uint8Vector(Uint8Vector other) { + this(DASHJBLSJNI.new_Uint8Vector__SWIG_1(Uint8Vector.getCPtr(other), other), true); } public boolean isEmpty() { @@ -113,6 +125,14 @@ public Uint8Vector(int count, short value) { this(DASHJBLSJNI.new_Uint8Vector__SWIG_2(count, value), true); } + private int doCapacity() { + return DASHJBLSJNI.Uint8Vector_doCapacity(swigCPtr, this); + } + + private void doReserve(int n) { + DASHJBLSJNI.Uint8Vector_doReserve(swigCPtr, this, n); + } + private int doSize() { return DASHJBLSJNI.Uint8Vector_doSize(swigCPtr, this); } diff --git a/bls/src/main/java/org/dashj/bls/Uint8VectorVector.java b/bls/src/main/java/org/dashj/bls/Uint8VectorVector.java index d009878..ef1d783 100644 --- a/bls/src/main/java/org/dashj/bls/Uint8VectorVector.java +++ b/bls/src/main/java/org/dashj/bls/Uint8VectorVector.java @@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 4.0.2 + * This file was automatically generated by SWIG (https://www.swig.org). + * Version 4.2.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. * ----------------------------------------------------------------------------- */ @@ -21,7 +21,19 @@ protected static long getCPtr(Uint8VectorVector obj) { return (obj == null) ? 0 : obj.swigCPtr; } - @SuppressWarnings("deprecation") + protected static long swigRelease(Uint8VectorVector obj) { + long ptr = 0; + if (obj != null) { + if (!obj.swigCMemOwn) + throw new RuntimeException("Cannot release ownership as memory is not owned"); + ptr = obj.swigCPtr; + obj.swigCMemOwn = false; + obj.delete(); + } + return ptr; + } + + @SuppressWarnings({"deprecation", "removal"}) protected void finalize() { delete(); } @@ -85,20 +97,20 @@ public int size() { return doSize(); } - public Uint8VectorVector() { - this(DASHJBLSJNI.new_Uint8VectorVector__SWIG_0(), true); + public int capacity() { + return doCapacity(); } - public Uint8VectorVector(Uint8VectorVector other) { - this(DASHJBLSJNI.new_Uint8VectorVector__SWIG_1(Uint8VectorVector.getCPtr(other), other), true); + public void reserve(int n) { + doReserve(n); } - public int capacity() { - return DASHJBLSJNI.Uint8VectorVector_capacity(swigCPtr, this); + public Uint8VectorVector() { + this(DASHJBLSJNI.new_Uint8VectorVector__SWIG_0(), true); } - public void reserve(int n) { - DASHJBLSJNI.Uint8VectorVector_reserve(swigCPtr, this, n); + public Uint8VectorVector(Uint8VectorVector other) { + this(DASHJBLSJNI.new_Uint8VectorVector__SWIG_1(Uint8VectorVector.getCPtr(other), other), true); } public boolean isEmpty() { @@ -113,6 +125,14 @@ public Uint8VectorVector(int count, Uint8Vector value) { this(DASHJBLSJNI.new_Uint8VectorVector__SWIG_2(count, Uint8Vector.getCPtr(value), value), true); } + private int doCapacity() { + return DASHJBLSJNI.Uint8VectorVector_doCapacity(swigCPtr, this); + } + + private void doReserve(int n) { + DASHJBLSJNI.Uint8VectorVector_doReserve(swigCPtr, this, n); + } + private int doSize() { return DASHJBLSJNI.Uint8VectorVector_doSize(swigCPtr, this); } diff --git a/bls/src/main/swig/bls-signatures.i b/bls/src/main/swig/bls-signatures.i index 5644223..05396d0 100644 --- a/bls/src/main/swig/bls-signatures.i +++ b/bls/src/main/swig/bls-signatures.i @@ -1,16 +1,16 @@ %module DASHJBLS %{ -#include "bls-signatures/src/bls.hpp" -#include "bls-signatures/src/chaincode.hpp" -#include "bls-signatures/src/elements.hpp" -#include "bls-signatures/src/extendedprivatekey.hpp" -#include "bls-signatures/src/extendedpublickey.hpp" -#include "bls-signatures/src/hdkeys.hpp" -#include "bls-signatures/src/hkdf.hpp" -#include "bls-signatures/src/privatekey.hpp" -#include "bls-signatures/src/schemes.hpp" -#include "bls-signatures/src/threshold.hpp" -#include "bls-signatures/src/util.hpp" +#include "bls-signatures/include/dashbls/bls.hpp" +#include "bls-signatures/include/dashbls/chaincode.hpp" +#include "bls-signatures/include/dashbls/elements.hpp" +#include "bls-signatures/include/dashbls/extendedprivatekey.hpp" +#include "bls-signatures/include/dashbls/extendedpublickey.hpp" +#include "bls-signatures/include/dashbls/hdkeys.hpp" +#include "bls-signatures/include/dashbls/hkdf.hpp" +#include "bls-signatures/include/dashbls/privatekey.hpp" +#include "bls-signatures/include/dashbls/schemes.hpp" +#include "bls-signatures/include/dashbls/threshold.hpp" +#include "bls-signatures/include/dashbls/util.hpp" #include "threshold-v1.hpp" using namespace bls; %} @@ -57,6 +57,13 @@ namespace bls { %rename ("$ignore", fullname=1) LegacySchemeMPL::AggregateVerify(const vector& pubkeys, const vector& messages, const G2Element& signature) override; %rename ("$ignore", fullname=1) PopSchemeMPL::FastAggregateVerify(const vector& pubkeys, const Bytes& message, const Bytes& signature); + %ignore PrivateKey::SerializeToArray(bool fLegacy) const; + %ignore PrivateKey::SerializeToArray() const; + %ignore G1Element::SerializeToArray(bool fLegacy) const; + %ignore G1Element::SerializeToArray() const; + %ignore G2Element::SerializeToArray(bool fLegacy) const; + %ignore G2Element::SerializeToArray() const; + %ignore GTElement::SerializeToArray() const; %ignore Threshold::PrivateKeyRecover(const std::vector& sks, const std::vector& ids); %ignore Threshold::PublicKeyRecover(const std::vector& sks, const std::vector& ids); %ignore Threshold::SignatureRecover(const std::vector& sigs, const std::vector& ids); @@ -221,16 +228,16 @@ namespace bls { } } -%include "src/main/cpp/bls-signatures/src/bls.hpp" -%include "src/main/cpp/bls-signatures/src/chaincode.hpp" -%include "src/main/cpp/bls-signatures/src/elements.hpp" -%include "src/main/cpp/bls-signatures/src/privatekey.hpp" -%include "src/main/cpp/bls-signatures/src/extendedpublickey.hpp" -%include "src/main/cpp/bls-signatures/src/extendedprivatekey.hpp" -%include "src/main/cpp/bls-signatures/src/hdkeys.hpp" -%include "src/main/cpp/bls-signatures/src/hkdf.hpp" -%include "src/main/cpp/bls-signatures/src/schemes.hpp" -%include "src/main/cpp/bls-signatures/src/threshold.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/bls.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/chaincode.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/elements.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/privatekey.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/extendedpublickey.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/extendedprivatekey.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/hdkeys.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/hkdf.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/schemes.hpp" +%include "src/main/cpp/bls-signatures/include/dashbls/threshold.hpp" %include "src/main/cpp/threshold-v1.hpp" diff --git a/bls/src/main/swig/bytes.i b/bls/src/main/swig/bytes.i index 2f331b7..f77ac31 100644 --- a/bls/src/main/swig/bytes.i +++ b/bls/src/main/swig/bytes.i @@ -10,7 +10,7 @@ * ----------------------------------------------------------------------------- */ %{ -#include "bls-signatures/src/util.hpp" +#include "bls-signatures/include/dashbls/util.hpp" %} namespace bls { diff --git a/pom.xml b/pom.xml index 1971149..b3a15e2 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ org.dashj dashj-bls-parent - 1.0.1 + 1.3.5-SNAPSHOT pom