在 Delphi 中使用 Sha-1 和证书签署 S/Mime 消息

发布于 2024-10-30 21:27:26 字数 309 浏览 2 评论 0原文

上下文:Delphi 2007

我将要发送一条 S/MIME 消息。有一个证书用于对消息进行签名。还有一个证书,我猜其中包含进行签名所需的密钥。应该使用 Sha1

我已经看过一些 sha1 代码示例,以及一些处理证书/密钥的示例,但实际上并不是一个很好的组合它们的示例。

我自己看到了一些很好又简单的东西,比如下面的代码

someObj = new SomeObj("key/cert", "sha-1");    
hashedMessage = so.Hash("orignal message");

Context: Delphi 2007

I am about to send an S/MIME message. There is a certificate which shall be used to sign the message. Also have a certificate which I guess includes the key(s) needed to do the signing. Sha1 should be used

I have seen some sha1 code examples, and a few examples that deals with certs/keys but not really a good one combining them.

I see for myself something nice and easy like the code below

someObj = new SomeObj("key/cert", "sha-1");    
hashedMessage = so.Hash("orignal message");

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文