加密和解密查询字符串 [英] encrypt and decrypt Querystring

查看:77
本文介绍了加密和解密查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我希望在我的应用程序中对查询字符串进行加密/解密.

我正在使用DESCryptoServiceProvider来做到这一点.工作正常.

但是加密的代码为12个或超过12个字符.我想将字符数限制为5.

例如:Encrypt("abcd", "r0b1nr0y")生成 pQGcY9az5HM = 我想将其限制为 pQGc 是否可以使用此算法.

如果还有其他任何问题,请告诉我.

Hi,

I wish to Encrypt/Decrypt Querystrings in my application.

I am using DESCryptoServiceProvider to do that. Works fine.

But the encrypted code is of 12 or more than 12 characters. I want to limit the character upto 5.

For eg: Encrypt("abcd", "r0b1nr0y") generates pQGcY9az5HM= i want to limit it to pQGc is it possible using this Algo.

Or if there is any other, please let me know.

Thanks

推荐答案

您无法控制加密字符串的长度.加密版本就是它-讨论结束.
You can''t control the length of an encrypted string. The encrypted version is what it is - end of discussion.


这篇关于加密和解密查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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