I have an app which encrypts some text strings, and then writes these to a file. The desktop version of the app is reading the file and decrypts the data. The problem is that wh
There are at least two problems with your code that will affect its functionality on different platforms:
You must specify a character set when calling getBytes()
or new String(...)
. Without this, the results will be different if your platforms have different default charsets.
You must fully specify your encryption algorithm, e.g. replace "AES"
with "AES/CBC/PKCS5Padding"
to avoid differences between providers.