RSA在Android上加密和解密字符串 [英] RSA Encrypt and Decrypt Strings on Android

查看:161
本文介绍了RSA在Android上加密和解密字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从几周以来我正在阅读页面和页面,但是找不到解决方案。
我想只到:

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


  1. 使我自己的公钥和私钥加密和解密我的PHP网站和Android应用程式(例如 http://www.example-code.com/android/rsa_generateKey .asp ,但是如何存储和使用生成的密钥?)

  2. 在我的应用程序中加密字符串

  3. 将字符串解密我的网站

  4. 在我的网站上加密字符串

  5. 从我的应用程序解密字符串

  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

我刚刚发现了一个简单的这个工作的类( http://www.example-code.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.

可能类似于

RSA Android加密/ RSA PHP解密

可以帮助,但它不是完整的源代码。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆