How do I get a digital signature from a document using PHP

纵饮孤独 提交于 2019-12-23 17:30:14

问题


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.

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

Edit

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


回答1:


You should start here:

PHP OpenSSL Functions

openssl_verify

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)



来源:https://stackoverflow.com/questions/12494648/how-do-i-get-a-digital-signature-from-a-document-using-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!