Here's an example B4J app which
- creates RSA Keys
- send the public key to a php script with a message
- the php will encrypt/decrypt/Send the server's keys
- concert/load the server's keys to see if it's compatible
- do an en-/decryption with the server's keys to check compatibility
This B4J-App uses 99.9% of the code of the B4A-APP in this thread: https://www.b4x.com/android/forum/threads/using-rsa-in-b4a-to-communicate-with-php-openssl.59445/
For the php scripts see the thread, too...
- creates RSA Keys
- send the public key to a php script with a message
- the php will encrypt/decrypt/Send the server's keys
- concert/load the server's keys to see if it's compatible
- do an en-/decryption with the server's keys to check compatibility
This B4J-App uses 99.9% of the code of the B4A-APP in this thread: https://www.b4x.com/android/forum/threads/using-rsa-in-b4a-to-communicate-with-php-openssl.59445/
For the php scripts see the thread, too...