I'm reading pages and pages since weeks but I cannot find a solution. I want "only" to:
- Make my own public and private keys to encrypt and decrypt strings between my PHP website and Android application (like on http://www.example-code.com/android/rsa_generateKey.asp but how can I store and use the generated keys?)
- Encrypt a string on my application
- Decrypt the string from my website
- Encrypt a string on my website
- Decrypt the string from my application
I've just found a class that does simply this job ( http://www.example-code.com/android/rsa_encryptStrings.asp ) but it is not free, and to make it work on PHP I should install a PHP extension but I can't on my web hosting.
Is there something similar? I'm studying a lot but I don't know why I don't understand how to do it in different ways.
Probably something similar to
RSA Android Encrypt / RSA PHP Decrypt
could help but it is not the complete source code.
Please give me some real working examples.
this should do it.
http://www.javamex.com/tutorials/cryptography/rsa_encryption.shtml
http://www.javamex.com/tutorials/cryptography/rsa_encryption_2.shtml
It's not an android question, much more Java.