是否有 .NET 类来处理加密?

发布于 2024-09-05 07:30:33 字数 411 浏览 3 评论 0原文

我需要加密字节码以通过连接发送到 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千仐 2024-09-12 07:30:33

您应该查看 System.Security.Cryptography< /code>命名空间。

目前尚不清楚您是否可以选择使用哪种算法等,但您可以考虑以下对称算法之一:

还有DESRC2,但我可能会忽略它们,除非你被迫使用它们。

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:

There are also implementations of DES and RC2, but I would probably ignore them unless you're forced to use them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文