【发布时间】:2015-12-26 12:15:09
【问题描述】:
我像这样渲染一个 ActionLink:
@Html.ActionLink(techName, "Details","Home", new { TopicID = item.TechID },null)
我想加密查询字符串,像这样:Home/Details?TopicID=Ek7vP1YwVhc=
我搜索了这个话题和found a piece of code对数据进行加解密:
(new MvcSerializer()).Serialize(<Your data here>, SerializationMode.EncryptedAndSigned)
And then to reverse the process...
(new MvcSerializer()).Deserialize(<Serialized data here>, SerializationMode.EncryptedAndSigned)
如何使用上述方法来加密和解密我的查询字符串?
【问题讨论】:
标签: c# asp.net-mvc security encryption