Search code examples
androidencryptionandroid-ndkopenssljava-native-interface

How do i add openssl library in android studio?


I want to implement AES and RSA encryption in my project using ndk(not using java API).by brief study i coming to know that i need to add openssl for achieving my task. i downloaded library from here openssl. but that contains plenty of files. i am confused what to do with that.is there anything i need to do to use library or is there any better approach other than openssl. please help me. i am using ubuntu 16.04 LTS 64 bit system.


Solution

  • If you are looking for a script to build the Android libs, you should not look further than the official site: wiki.openssl.org/index.php/Android. You can easily find prebuilt binaries, if you can afford this security compromise.

    You may prefer the Chromium fork (https://opensource.google.com/projects/boringssl) which is not 100% plug-and-play compatible with the upstream, but has been tuned for the needs and limitations of Android app, and is pretty well documented.