title: How to store Private Key and Public Key into KeyStore
body: <p>All.I am working on an android project. I need to generate a RSA keypair then use them to communicate with others.I need to store the private key and public key in a secure place and I find KeyStore could be used.</p>
  
  <p>I see that KeyStore could store KeyStore.PrivateKeyEntry but it need a Certificate[] chain. I tried to create it but failed...</p>
  
  <p>Is there anyone could paste some example code used to store private key and public key.</p>
  
  <p>Thanks so much!</p>