ASP.Net中的RSA加密/解密在生产中不起作用 [英] RSA Encryption/Decryption in ASP.Net not working on Production

查看:113
本文介绍了ASP.Net中的RSA加密/解密在生产中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有JavaScript函数可对一个站点上的数据进行加密,而代码隐藏函数可对另一站点上的数据进行解密.当我在本地或在测试服务器上对其进行测试时,它可以正常工作.但是,这在生产服务器上给了我错误的长度"错误.

同样在javascript中,我在加密之前检查数据(来自输入控件type = text的用户输入)是否为空字符串(如果str == null和str ==''''然后显示消息),但是在生产上不起作用. (不给出消息,而是继续进行加密部分).我想知道测试服务器和生产服务器之间的数据(字符串)是否有所不同. (虽然听起来很疯狂...)

Hi,

I have javascript functions to encrypt data on one site and code-behind functions to decrypt it on another site. It works fine when I test it locally, or on a testing server. However it gives me a ''Bad Length'' error on a production server.

Also in the javascript, I am checking if the data (user input from input control type=text) is null string or not (if str == null and str == '''' then display a message) before encrypting, but it does not work on the production. (Does not give the message and proceed to the encryption part). I wonder if the data (string) is treated differently between the testing server and the production server. (Sounds crazy though...)

Does anyone have any idea?

推荐答案

看看是否有帮助. http://stackoverflow.com/questions/1496793/rsa-encryption-getting-bad-length [^ ]
see if this helps..
http://stackoverflow.com/questions/1496793/rsa-encryption-getting-bad-length[^]


这篇关于ASP.Net中的RSA加密/解密在生产中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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