是否有 .NET 类来处理加密?
我需要加密字节码以通过连接发送到 Web 服务,最好使用 GUID 作为密钥。我做了一些研究,发现了几个出于类似目的而开发的类,但未能找到 Windows 库中内置的太多内容。 我的问题是:C# 中是否有内置的东西可以执行此任务?如果没有,我将非常感谢任何有关实施的建议。
编辑:阅读这篇文章后 我什么时候会选择 AesCryptoServiceProvider AesManaged 还是 RijndaelManaged? 我将使用 AESCryptoServiceProvider。
I need to encrypt bytecode to send over a connection to a webservice, preferably using a GUID as a key. I have done a bit of research and found several classes developed for a similar purpose, but haven't been able to turn up much that is built into the Windows libraries.
My question is: Is there something built in to C# that performs this task? If there is not, I would very much appreciate any suggestions as to implementation.
Edit: After reading this post When would I choose AesCryptoServiceProvider over AesManaged or RijndaelManaged?
I am going with AESCryptoServiceProvider.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该查看
System.Security.Cryptography< /code>
命名空间。
目前尚不清楚您是否可以选择使用哪种算法等,但您可以考虑以下对称算法之一:
AesCryptoServiceProvider
RijndaelManaged
TripleDESCryptoServiceProvider
还有DES 和 RC2,但我可能会忽略它们,除非你被迫使用它们。
You should check out the
System.Security.Cryptography
namespace.It's not clear whether you're in a position to choose which algorithm etc to use, but you might consider one of the following symmetric algorithms:
AesManaged
orAesCryptoServiceProvider
RijndaelManaged
TripleDESCryptoServiceProvider
There are also implementations of DES and RC2, but I would probably ignore them unless you're forced to use them.