Dec 9, 2013 Replies: 5 For new projects it is recommended to use B4XEncryption to create a cross platform solution. RandomAccessFile library v1.10 includes the beloved ReadEncrypredObject / WriteEncryptedObject methods. These two methods are similar to ReadObject and WriteObject methods which are very powerful and useful and they allow you to easily write complex objects in a single line of code. ReadEncryptedObject and WriteEncryptedObject methods also encrypt the data. The B4A tutorial is available here: Encrypting information with RandomAccessFile library The encryption method used is the same in B4J and B4A so you can easily exchange secured data between your mobile app and desktop app. The algorithm name is: PBEWITHSHAAND256BITAES-CBC-BC Note that you can also write custom types and collections of custom types. The saved types can also be shared between B4J and B4A. These two methods depend on an encryption library named Bouncy Castle. Android includes this library as part of the OS. In B4J you need to download the jar file: https://www.bouncycastle.org/download/bcprov-jdk15on-154.jar and copy it to the additional libraries folder. In your code you should add the following module attribute: #AdditionalJar: bcprov-jdk15on-154 Last edited: Sep 20, 2022 Click to expand...
For new projects it is recommended to use B4XEncryption to create a cross platform solution. RandomAccessFile library v1.10 includes the beloved ReadEncrypredObject / WriteEncryptedObject methods. These two methods are similar to ReadObject and WriteObject methods which are very powerful and useful and they allow you to easily write complex objects in a single line of code. ReadEncryptedObject and WriteEncryptedObject methods also encrypt the data. The B4A tutorial is available here: Encrypting information with RandomAccessFile library The encryption method used is the same in B4J and B4A so you can easily exchange secured data between your mobile app and desktop app. The algorithm name is: PBEWITHSHAAND256BITAES-CBC-BC Note that you can also write custom types and collections of custom types. The saved types can also be shared between B4J and B4A. These two methods depend on an encryption library named Bouncy Castle. Android includes this library as part of the OS. In B4J you need to download the jar file: https://www.bouncycastle.org/download/bcprov-jdk15on-154.jar and copy it to the additional libraries folder. In your code you should add the following module attribute: #AdditionalJar: bcprov-jdk15on-154
R rboeck Well-Known Member Licensed User Longtime User Feb 21, 2015 #2 I tried to use encryption for the first time with B4J and i am getting: error reading C:\Program Files\Anywhere Software\B4J\libraries\bcprov-jdk15on-150.jar; error in opening zip file 1 error I am using jdk 1.8.0_31; do have to go back to jdk 1.7 ?
I tried to use encryption for the first time with B4J and i am getting: error reading C:\Program Files\Anywhere Software\B4J\libraries\bcprov-jdk15on-150.jar; error in opening zip file 1 error I am using jdk 1.8.0_31; do have to go back to jdk 1.7 ?
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2015 #3 It is not related to the Java version. My guess is that the file was copied to the virtualized program files folder. Delete the jar from the internal libraries folder and copy it to the additional libraries folder (which shouldn't be inside program files).
It is not related to the Java version. My guess is that the file was copied to the virtualized program files folder. Delete the jar from the internal libraries folder and copy it to the additional libraries folder (which shouldn't be inside program files).
R rboeck Well-Known Member Licensed User Longtime User Feb 22, 2015 #4 I tried another path outside of program files, but it did not change anything. So i tried 'bcprov-jdk15on-151' from http://www.bouncycastle.org/latest_releases.html and it worked; what the problem with the older version was, is still unclear for me. Thanks for your help!
I tried another path outside of program files, but it did not change anything. So i tried 'bcprov-jdk15on-151' from http://www.bouncycastle.org/latest_releases.html and it worked; what the problem with the older version was, is still unclear for me. Thanks for your help!
W walt61 Well-Known Member Licensed User Longtime User Dec 29, 2017 #5 For info: Bouncy Castle 1.59 is now available, which fixes a recent CVE: https://www.bouncycastle.org/download/bcprov-jdk15on-159.jar (details are listed on http://www.bouncycastle.org/latest_releases.html). Just put it in the same location as the previous version and change your module attribute to '#AdditionalJar: bcprov-jdk15on-159'
For info: Bouncy Castle 1.59 is now available, which fixes a recent CVE: https://www.bouncycastle.org/download/bcprov-jdk15on-159.jar (details are listed on http://www.bouncycastle.org/latest_releases.html). Just put it in the same location as the previous version and change your module attribute to '#AdditionalJar: bcprov-jdk15on-159'
spyd3iz New Member Licensed User Longtime User May 31, 2020 #6 Version 1.65 is out: https://www.bouncycastle.org/download/bcprov-jdk15on-165.jar to download and as walt61 said : #AdditionalJar: bcprov-jdk15on-165 in the region project attributes.
Version 1.65 is out: https://www.bouncycastle.org/download/bcprov-jdk15on-165.jar to download and as walt61 said : #AdditionalJar: bcprov-jdk15on-165 in the region project attributes.