Any way to generate JNI files from .c and .h files?

I compiled Opensslfor android, but I don't see how to access functions from java. I think for this I need some JNI files. Is there a way to generate the appropriate JNI files for libssl.so and libcrypto.so from Openssl.c and .h files.

+3
source share
1 answer

Take a look at swig . This should be able to generate the necessary Java and c-code so that you can name your own functions defined in the openssl header of Java.

You just have to do:

swig openssl.h

java, openssl.h, c-, android (, openssl).

node Bouncy Castle. , android ( javax.net.ssl ​​ - , openssl android),

0

All Articles