3

I cannot get the Conceal Library to work, it may be something I am doing wrong, I wish the instructions were a bit more detailed.

http://facebook.github.io/conceal/documentation/

I have added the crypto.jar to my project, and then the instructions tell me to add the files armeabi/*.so to my jni folder.

"Add a dependency to crypto.jar from java code using your favorite dependency management system, and drop the .so files in libs.zip into your jni/ folder."

I don't have a jni folder, since my project is a normal Android progect, not an NDK project. How can I get this to work, I tried creating the folder and adding it to the build path, but it did not work. I am completely lost on this. In my source code I am loading the libraries like this:

static {
// Load Facebook Conceal Crypto Files
System.loadLibrary("libconceal.so");
System.loadLibrary("libcryptox.so");

} 
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Steven Romero
  • 115
  • 1
  • 2
  • 6

1 Answers1

3

then the instructions tell me to add the files armeabi/*.so to my jni folder.

That's a bug in their documentation. Pre-compiled .so files will go in libs/. So, you should wind up with libs/armeabi/*.so.

I tried creating the folder and adding it to the build path

That is almost never the right answer and can seriously screw things up, so I recommend that you reverse that step.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thank you for the response, I tried putting the .so files in the libs directory, and I still had the same problem. – Steven Romero Apr 21 '14 at 21:41
  • @StevenRomero: If the problem is "In my source code I am loading the libraries like this", that's because you shouldn't be doing that AFAIK. The JAR contains the code to load the `.so` files. You just use the public API from the JAR, as shown in their documentation (assuming there aren't more bugs in it...). – CommonsWare Apr 21 '14 at 21:46
  • Thank you, your suggestions worked well, I am now able to create an encrypted file using the Conceal library. – Steven Romero Apr 21 '14 at 21:53