我有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加密/解密在生产中不起作用
发布评论