Android Question Need help in Encryption with key+iv structure

Arun

Member
Licensed User
Longtime User
I need help in understanding how to use Encryption/Decryption in b4a.

The app will create an encrypted file with app parameters on the Android device (b4a).

This file will then be decrypted, app parameter permissions modified, and the modified file will be encrypted again (vb.net).

The modified encrypted file will be sent to the device where it needs to be decrypted (b4a).

This is a working on PCs. I just need to port the encryption/decryption to b4a. I have tried playing around using the "Encryption Demo", this post and this post.

I need help to proceed from here to get the same results as my VB.Net code (using bytKey and bytIV)?

I am a noob to the cryptography concepts, even in vb.net, but the vb.net code works. So please keep the explanations for b4a simple.

Thanks in advance!

Edit: I have removed my code since it exposes my methodology. Anyway, it is non-working code, so I don't think any one is going to benefit by it. I hope it is ok?
 
Last edited:

Arun

Member
Licensed User
Longtime User
Why don't you build your server with B4J? Everything will be simpler...

You need to use AES, not RSA. You do not need KeyPairGenerator. This is a symmetric algorithm.
Hi Erel,

Sorry for the late response, but I was unwell, and unable to work further on this.

You sure have set me off on a tangent. :) Since your suggestions are always spot on, I will check out the alternatives you have given.

Thanks!
 
Upvote 0
Top