C# 创建 MIME 消息?
C# .Net 中是否有内置的 MIME 文件功能?我想要做的是:
- 将文件转换为 MIME 消息
- 将 MIME 消息签名为 pkcs 7 blob
- 的 pcks 7 blob MIME
- 最后加密整个内容。
关于如何解决这个问题有什么建议吗(不是加密或签名部分,而是 MIMEing)? MIME 处理文件到底涉及什么?
Is there any built in functionality to MIME a file in C# .Net? What I am looking to do is:
- Convert a file into a MIME message
- Sign the MIME Message to a pcks 7 blob
- MIME that pkcs 7 blob
- Finally encrypt the entire thing.
Any suggestions on how I would go about this (not the encryption or signing part but the MIMEing)? What exactly is envolved in MIMEing a file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
有一个很好的商业包,只需支付少量费用:
Mime4Net
There is a good commercial package for a small fee:
Mime4Net
我建议您不要使用第三方库,而是查看核心 .NET 库。使用 Attachment 类;它自 .NET 2 以来就已存在。
Rather than deal with third party libraries, I suggest you look to the core .NET library. Use the Attachment class; it's been around since .NET 2.
据我所知,裸露的.NET 中没有这样的支持。您必须尝试第三方库之一。其中之一是我们的 Rebex Secure Mail for .NET。以下代码显示了如何实现它:(
代码取自 S/MIME 教程页面)
As far as I know there is no such support in the bare .NET. You have to try one of third party libraries. One of them is our Rebex Secure Mail for .NET. Following code shows how to achieve it:
(Code taken from the S/MIME tutorial page)
没有提到的是 MimeKit。
它可以完成您需要它做的一切。
(这仍然是谷歌的热门,所以我想添加这个宝石)
Something that hasn't been mentioned is MimeKit.
It does everything that you need it to do.
(this is still a top hit in google so thought I'd add this gem)