title: RSA Encrypt and Decrypt Strings on Android
body: <p>I'm reading pages and pages since weeks but I cannot find a solution.
  I want "only" to:</p>
  
  <ol>
  <li>Make my own public and private keys to encrypt and decrypt strings between my PHP website and Android application (like on <a href="http://www.example-code.com/android/rsa_generateKey.asp" rel="nofollow noreferrer">http://www.example-code.com/android/rsa_generateKey.asp</a> but how can I store and use the generated keys?)</li>
  <li>Encrypt a string on my application</li>
  <li>Decrypt the string from my website</li>
  <li>Encrypt a string on my website</li>
  <li>Decrypt the string from my application</li>
  </ol>
  
  <p>I've just found a class that does simply this job ( <a href="http://www.example-code.com/android/rsa_encryptStrings.asp" rel="nofollow noreferrer">http://www.example-code.com/android/rsa_encryptStrings.asp</a> ) 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.</p>
  
  <p>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.</p>
  
  <p>Probably something similar to </p>
  
  <p><a href="https://stackoverflow.com/questions/7331684">RSA Android Encrypt / RSA PHP Decrypt</a></p>
  
  <p>could help but it is not the complete source code. </p>
  
  <p>Please give me some real working examples.</p>