如何使用RSA公钥和私钥对较大的字符串进行加密和解密 [英] How to encrypt and decrypt a larger string using RSA public and private key

查看:91
本文介绍了如何使用RSA公钥和私钥对较大的字符串进行加密和解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

实际上,我想加密一个更大的字符串并使用RSA公钥和私钥对其解密.但是实际上对于1024键大小发生了什么,我只能使用117个字节长的字符串.

Actually I want to encrypt a larger string and decrypt it using RSA public and private keys. But actually what is happening for a 1024 key size, I can only able to use 117 byte length string.

但是我想加密和解密一个更大的字符串.请有人给我一个想法或简单的解决方案来做到这一点.

But I want to encrypt and decrypt a larger string. Please someone give me an idea or simple solutions to do this.

此致

塞尔瓦库玛(T.Selvakumar)

T.Selvakumar

推荐答案

您能否提供到目前为止如何进行加密/解密的代码? 117byte的长度限制确实令人困惑,我想知道您做了什么.

can you give the code how you encrypt / decrypt so far? The 117byte length limit is really confusing and I am wondering what you did.

RsaCryproServiceProvide已经包含有关如何解密和加密的示例代码:
http://msdn.microsoft.com/zh-CN/library/system.security.cryptography.rsacryptoserviceprovider.aspx

The RsaCryproServiceProvide already contains example code on how to decrypt and encrypt:
http://msdn.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.aspx

以诚挚的问候,

康拉德


这篇关于如何使用RSA公钥和私钥对较大的字符串进行加密和解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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