关于asp.net:加密的查询字符串

Encrypted Query String

我已经使用MachineKey.Encode加密了一个ID,该ID将作为查询字符串传递给页面,但是正如预期的那样,这会使URL变得很大。

是否有诸如HTTP处理程序之类的选项可以自定义网址,但仍加载所需的页面?

另外我还没有发现MachineKey.Encode是否使用我在web.config文件中定义的MachineKey来加密数据,任何人都可以通过支持此的Web信息对我进行确认。

谢谢。


Also I am yet to find out if MachineKey.Encode is using the MachineKey that I have defined in my web.config file to encrypt the data, can anybody confirm this for me with web information that backs this up.

它确实确实使用了已配置的密钥。 MachineKey调用MachineKeySection.EncryptOrDecryptData进行加密,该加密使用从计算机密钥部分配置的加密对象。 如果您想亲自看看,有趣的电话是EncryptOrDecryptData => EnsureConfig => ConfigureEncryptionObject => SetKeyOnSymAlgorithm