RSA加密和解密字符串在Android [英] 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:
- 请自己的公钥和私钥加密和解密我的PHP网站和Android应用程序(如上的 HTTP://www.example-$c$c.com/android/rsa_generateKey.asp 但如何存储和使用生成的密钥)
- 加密串在我的应用程序
- 从我的网站解密字符串
- 加密串在我的网站
- 从我的应用程序解密字符串
- 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?)
- Encrypt a string on my application
- Decrypt the string from my website
- Encrypt a string on my website
- Decrypt the string from my application
我刚刚发现,简单地做这项工作的类( HTTP: //www.example-$c$c.com/android/rsa_encryptStrings.asp ),但它不是免费的,并使其在PHP工作,我应该安装PHP扩展,但我不能在我的网页托管。
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.
可能是一些类似于
可以帮助,但它不是完整的源$ C $ C。
could help but it is not the complete source code.
请给我一些实际工作的例子。
Please give me some real working examples.
推荐答案
这应该这样做。
http://www.javamex.com/tutorials/cryptography/rsa_encryption.shtml
http://www.javamex.com/tutorials/cryptography/rsa_encryption_2.shtml
这不是一个Android的问题,更多的Java。
It's not an android question, much more Java.
这篇关于RSA加密和解密字符串在Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!