如何在asp.net中加密查询字符串?
如何加密 aspx.net 中的查询字符串?
PS 我意识到这并不能提供安全性。我只是想混淆一个谜题。
PPS 虽然我将 CKret 的答案标记为正确的答案(对于这个问题的措辞,我相信他是最正确的答案)。然而,对于我自己来说,我只是想尝试 ChoasPandion 的加密替代方案。如果我需要更多的安全性,我会考虑 CKret 或 Ian 的。
How do I encrypt query strings in aspx.net?
P.S. I realize that this does not offer security. I'm just looking to obfuscate a puzzle.
P.P.S Though I marked CKret's answer as the correct one (for the question as worded I believe his is the most correct answer). However, for myself, I'm just going to try ChoasPandion's alternative to encryption. If I needed more security I'd look at CKret's or Ian's.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不用费心加密它。只需将其转换为 Base 64 字符串即可。
Don't bother encrypting it. Just convert it to a base 64 string.
如果您试图隐藏您的产品 ID 和类似内容,那么为什么不直接使用 加密?
我想您想要做的是阻止人们编辑查询字符串以获得不同的结果。执行此操作的简单方法是将查询字符串的哈希添加到查询字符串,并使用一些基页功能检查请求的哈希是否正确,从而识别被篡改的查询字符串。
请参阅通过添加哈希来防止查询字符串操作?
If you trying to hide your product Id's and things like that, then why not just use Encryption?
I guess what you want to do, is to stop people editing the query string to get different results. The simple way to do this, is to add a Hash of the query string to the query string, and have some base-page functionality check that the hash is correct for the request, identifing tampered query strings.
See Prevent query string manipulation by adding a hash?