简体   繁体   English

如何使用PHP从文档中获取数字签名

[英]How do I get a digital signature from a document using PHP

I am very new to this Digital Signature stuff. 我对这个数字签名的东西很新。

  • What I want to do, is check if a document is digitally signed. 我想要做的是检查文档是否经过数字签名。
  • If it's signed, then verify the signature. 如果已签名,则验证签名。

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),但我无法找到任何关于:文档是否已签名(我还在stackoverflow中找到了一些相关问题,但没有以理想的方式回答)我不是寻找任何第三方工具。

Are there any openssl methods or any other ways to know whether the document is signed or not signed using php? 是否有任何openssl方法或任何其他方式来知道文档是否使用PHP签名或未签名?

Edit 编辑

Submitting documents are pdf, Do the type of documents makes ane difference in the process ? 提交文件是pdf,文件类型是否会在过程中产生差异?

You should start here: 你应该从这里开始:

PHP OpenSSL Functions PHP OpenSSL函数

openssl_verify openssl_verify

For PDF files I would recommend TCPDF 对于PDF文件,我建议使用TCPDF

Here is some signature related example (This is actualy for signin, not for verifying, but take a look and study) 这是一些签名相关的例子 (这是登录的实际,不是用于验证,而是看看和研究)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM