Hi All,
I recently had the need to send encrypted data from my B4A/B4J/B4i apps to a .net web service.
Because the B4XEncryption library works in all the B4X environments, I wanted a way to decrypt and encrypt data in the same way as the B4XEncryption libraries do.
Details of the B4XEncryption library can be found here:
https://www.b4x.com/android/forum/threads/b4xencryption.48177/
With a little help from Erel I build a .net DLL for this purpose.
A Visual Studio 2017 project with the DLL code and a test console application can be found on github at the following URL:
https://github.com/chrisleeuk/B4XEncryption.net
If you want to use the DLL without compiling it first, just copy the B4XEncryption.dll and BouncyCastle.Crypto.dll to the bin folder of your Visual Studio project and add them as references.
Typically if you are sending encrypted data, you will want some way of encoding it for transmission. In my case I'm sending it to a rest .net web service. In this case I'm encoding it in base 64 before sending it to my service.
The great part about this is that you can drop your base64 encoded string into a JSON object and send it to the .net service.
I don't have time to provide an example of that right now, but the DLL will hopefully save some time.
I recently had the need to send encrypted data from my B4A/B4J/B4i apps to a .net web service.
Because the B4XEncryption library works in all the B4X environments, I wanted a way to decrypt and encrypt data in the same way as the B4XEncryption libraries do.
Details of the B4XEncryption library can be found here:
https://www.b4x.com/android/forum/threads/b4xencryption.48177/
With a little help from Erel I build a .net DLL for this purpose.
A Visual Studio 2017 project with the DLL code and a test console application can be found on github at the following URL:
https://github.com/chrisleeuk/B4XEncryption.net
If you want to use the DLL without compiling it first, just copy the B4XEncryption.dll and BouncyCastle.Crypto.dll to the bin folder of your Visual Studio project and add them as references.
Typically if you are sending encrypted data, you will want some way of encoding it for transmission. In my case I'm sending it to a rest .net web service. In this case I'm encoding it in base 64 before sending it to my service.
The great part about this is that you can drop your base64 encoded string into a JSON object and send it to the .net service.
I don't have time to provide an example of that right now, but the DLL will hopefully save some time.