erluxman erluxman - 3 years ago 170
Java Question

Looking for an encrypt/decrypt AES example for Android

As I am new to encryption and particularly in Java/Android, I am struggling to find tutorials and code that work fine so that I can learn from them but the results.

As in this site: https://www.owasp.org/index.php/Using_the_Java_Cryptographic_Extensions

I couldn't find the problem that hit me with

BASE64Encoder
class, which seems to be inside package a sun.utils but I can find
Base64
class but I could not tweak code so that it could work for me.

Similarly in this

android encryption/decryption with AES

The encryption is done in
Bitmap Image
I could not realize the same technique in normal text string.

Would someone supply a simple AES encryption/decryption example in Android just showing how to use key,message, encryption and decryption?

Answer Source

The encryption and decryption process worked fine after: I replaced the byte array obtained from :

Bitmap by byte array of message string as instructed in

android encryption/decryption with AES

So even though my problem is not fully solved, this question should be marked as answered.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download