开发者

RSA Encrypt and Decrypt Strings on Android

I'm reading pages and pages since weeks but I cannot find a solution. I want "only" to:

  1. 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?)
  2. Encrypt a string on my application
  3. Decrypt the string from my 开发者_运维问答website
  4. Encrypt a string on my website
  5. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜