Fp holds an instance of RandGen: a wrapper for a random generator.
In C++, this random function can be overridden, for example in the case where a seed has previously been generated
mcl::fp::RandGen::setRandFunc(self, readFunc);
Indeed, most of the libraries that use this library (bls-go, bls-js etc.) have a "setRand" binding which maps to the above code.
However, the instance of RandGen is inaccessible from the swig generated JNI and therefore the java bindings do not have the ability to specify a seed like you can in C.
I have spent hours trying adding the boiler plate to get the following binding to work in Java:
Mcl.setRandData(byte[] seed);
which would do the above under the hood but to no avail.
Fp holds an instance of RandGen: a wrapper for a random generator. In C++, this random function can be overridden, for example in the case where a seed has previously been generated mcl::fp::RandGen::setRandFunc(self, readFunc);
Indeed, most of the libraries that use this library (bls-go, bls-js etc.) have a "setRand" binding which maps to the above code. However, the instance of RandGen is inaccessible from the swig generated JNI and therefore the java bindings do not have the ability to specify a seed like you can in C.
I have spent hours trying adding the boiler plate to get the following binding to work in Java: Mcl.setRandData(byte[] seed); which would do the above under the hood but to no avail.