We can use the normal java way to generate RSA key. (for security reason, we'd betterĀ generate 2048 bytes RSA key) But the problem is the most popular way to store RSA key is keeping them as DER format. You can get some detailed info below: http://www.cryptosys.net/pki/rsakeyformats.html Also if you want the java code ...
We can use both Key and Password to encryt file. Use the Key I rewrited the DESEncryptUtil got from internet. PBE the third party utility - Jasypt is used to encrypt/decryt ...