如何使用PHP从文档获得数字签名 [英] How do I get a digital signature from a document using PHP

查看:123
本文介绍了如何使用PHP从文档获得数字签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对这种数字签名非常陌生。

I am very new to this Digital Signature stuff.


  • 我想做的是检查文档是否经过数字签名。

  • 如果已签名,请验证签名。

我进行了很多搜索。我发现了一些有关验证签名的有用主题(使用openssl),但我却找不到以下内容:文档是否已签名
(我还在stackoverflow中找到了一些相关问题,但未以期望的方式回答)我没有在寻找任何第三方工具。

I have searched a lot. I found some helpful topics about verifying the signature (Using openssl), but I was unable to find anything about: Is the document signed or not (I also found some related questions in stackoverflow, but not answered in a desired way) I am not looking for any third party tools.

是否有任何openssl方法或其他任何方式来了解文档是否使用签名php?

Are there any openssl methods or any other ways to know whether the document is signed or not signed using php?

编辑

提交文档为pdf,请问文档类型在该过程中起什么作用?

Submitting documents are pdf, Do the type of documents makes ane difference in the process ?

推荐答案

您应该从这里开始:

PHP OpenSSL函数

openssl_verify

对于PDF文件,我建议 TCPDF

For PDF files I would recommend TCPDF

这里是一些与签名相关的示例(这实际上是登录目的,不是为了验证,而是看一下和学习)

Here is some signature related example (This is actualy for signin, not for verifying, but take a look and study)

这篇关于如何使用PHP从文档获得数字签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆