openssl 中的 RijndaelManaged 等效项

发布于 2024-09-29 01:52:53 字数 301 浏览 1 评论 0原文

There is some code written using C# which uses RijndaelManaged class to encrypt data and

Mode = CipherMode.CBC
I need implement the equivalent code in Mac using OpenSSl.
What is the equivalent to RijndaelManaged in OpenSSl?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

囚我心虐我身 2024-10-06 01:52:53

RijndaelManaged 只是 Rijndael 算法的 .NET 实现。 Rijndael 是为 AES 选择的算法,但 AES 并未使用 Rijndael 可能的所有密钥长度(AES 是 Rijndael 的子集)。

如果您的代码在 RijndaelManaged 中使用的密钥也是有效的 AES 密钥,您可以只使用 OpenSSL 的 AES 功能;否则我不确定......但我建议您坚持使用 Rijndael 的 AES 子集,因为这就是其他人所做的,它将帮助您实现互操作性。

RijndaelManaged is just a .NET implementation of the Rijndael algorithm. Rijndael is the algorithm that was chosen for AES, but AES doesn't use all of the key lengths that are possible with Rijndael (AES is a subset of Rijndael).

If the keys that your code uses with RijndaelManaged are also valid AES keys you can just use OpenSSL's AES functionality; otherwise I'm not sure ... but I'd advise you to stick to the AES subset of Rijndael because that's what everyone else does and it will help you to achieve interoperability.

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