ASP.Net中的RSA加密/解密在生产中不起作用

编程入门 行业动态 更新时间:2024-10-27 22:26:06
本文介绍了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?

推荐答案

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

更多推荐

ASP.Net中的RSA加密/解密在生产中不起作用

本文发布于:2023-05-31 10:02:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/389508.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中不   ASP   Net   RSA

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!