我需要在flex中加密和解密Sha或Md5算法
您好,我正在使用 Flex 和 JSP 开发我的应用程序,因此当我使用请求对象通过 HTTP Service Post 方法传递值时,但这些值正在由测试团队跟踪和修改,因此我计划在 Flex 中加密值并在 jsp 中解密。那么有没有像 SHA 或 MD5 这样更安全的算法,所以请发送任何代码或相关链接,这对我非常有用。我正在使用像
httpService = new HTTPService;
httpService.request = new Object;
httpService.request.task = "doInvite";
httpService.request.email = emailInput.text;
httpService.request.firstName = firstNameInput.text;
httpService.request.lastName = lastNameInput.text;
httpService.send();
所以有没有其他方法可以提供更安全,请帮助我,提前致谢。
Hi I am developing my application in flex and JSP, so when I am passing values through HTTP Service Post method with request object but these values are tracing and modifying by testing team so I am planning to encrypt values in flex and decrypt it in jsp.so is there any algorithms like SHA or MD5 more secure algorithms, so please send any code or related links it is very useful to me. I am using like
httpService = new HTTPService;
httpService.request = new Object;
httpService.request.task = "doInvite";
httpService.request.email = emailInput.text;
httpService.request.firstName = firstNameInput.text;
httpService.request.lastName = lastNameInput.text;
httpService.send();
So is there any other way to give more secure ,please help me in this,Thanks in Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您无法“解密”MD5 或 SHA1 哈希值,它们是单向哈希值,这意味着它们是不可恢复的。
you can't "decrypt" MD5 or SHA1 hashes they are ONE-WAY hashes which means they are non-recoverable.
有点难以阅读,但是(据我所知)您将加密与散列混淆了。 MD5 和 SHA 都不是加密算法,它们是哈希算法:
哈希函数
加密
Kinda hard to read, but (as far as I could understand) you're confusing Encryption with Hashing. Neither MD5 nor SHA are encryption algorithms, they're hash algorithms:
Hash Function
Encryption
您应该考虑发布到网站的安全区域,即通过 https。
You should consider posting to a secure area of the site, i.e. over https.
我找到了一个成熟的 Flex 库,它同时实现了 MD5 和 SHA-1 哈希算法。所以现在您可以在 Flex 端使用其中任何一个。
http://github.com/mikechambers/as3corelib
当然,你不能用哈希算法,因此您必须将持久哈希与通过网络发送的哈希进行比较。
I have found a mature Flex library that implements both the MD5 and SHA-1 hash algorythms. So now you can use either one on the Flex side.
http://github.com/mikechambers/as3corelib
Of course, you can't go backwards with a hash algorythm, so you'll have to compare the persisted hash with the one sent over the wire.