B4J Question [Solved] B4J Encryption, Bouncy Castle?

scGuy

Member
Licensed User
I've been trying to use File.WriteEncryptedObject and when that failed, I tried B4XCipher.Encrypt

Both of them fail, java exception, in the case of B4XCipher, right on the Dim statement.

From searching on here, I get the impression I'm supposed to have bouncy castle jar installed, so I downloaded latest (bcprov-ext-jdk18on-175.jar)

I copied the jar into Z:\Project\Lib\B4J

In B4J, my "additional libraries" path is set to Z:\Project\Lib

...I have jReflection in there also, and that appears in the Library Manager, shown as "additional" instead of internal. The bouncy jar does not show up in the library manager, and the encryption calls still fail.

I'm not experienced installing additional libraries... which piece of the puzzle did I miss? I notice the jReflection.jar is accompanied by a jReflection.xml. That is not the case with bouncy castle. All I'm trying to do is save a map to an encrypted file in B4J. Worked fine on B4A with none of this headache.

Thanks in advance!
 

scGuy

Member
Licensed User
Sorry everyone it was right there in examples, no I did not have the AdditionalJar. All working now, thank you. I guess I'm unclear about libraries... some are "internal" and come with B4X, some can be copied into lib folder, where they will appear and be selected through the Library Manager. And some like this one, should be copied to the Lib folder, but you need to activate it with AdditionalJar instead. From now on I will look for any code in orange as well! Thanks
 
Upvote 0
Top