将 byte[] 转换为非对称算法的某种实现

发布于 2024-12-20 02:00:48 字数 335 浏览 3 评论 0原文

我需要将 byte[] 转换为非对称算法的某种实现。我正在尝试签署 xml,但只能获取字节数组中的私钥。 如果有人需要知道的话,我正在使用相当好的 PKCS11.Net 来访问令牌。

我用来签名的类是这样的:System.Security.Cryptography.Xml.SignedXml
该属性仅要求 AmetryAlgorithm :XmlSignedXml.SigningKey

有谁知道该怎么做?

I need to convert a byte[] to some implementation of AsymmetricAlgorithm. I am trying to sign a xml and I can only get the private key in a byte array.
I am using the quite good PKCS11.Net to access a token, if anyone needs to know.

The class I am using to sign is this: System.Security.Cryptography.Xml.SignedXml
The property only asks for AsymmetricAlgorithm : XmlSignedXml.SigningKey;

Does anyone knows how to do it?

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

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

发布评论

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

评论(1

过去的过去 2024-12-27 02:00:48

使用像 http://www.bouncycastle.org/ 这样的库来导入它。

Use a library like http://www.bouncycastle.org/ to import this.

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