digital-signature

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

Can I digitally sign JScript (.js) or VBScript (.vbs) files?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 12:54:16
问题 I know that one can sign a Windows binary executable file using signtool. So all this time I was under assumption that one cannot sign any of the files interpreted by Windows Script Host , such as JScript (.js) or VBScript (.vbs) because those are mere text files. But today, while opening a .js file that I downloaded off my web site, I was greeted by this warning: So does this mean that there's a way to sign those .js / .vbs files? If so, then how? 回答1: Just to finalize my original question.

Stripe webhook signature failed - Stripe.net

时光总嘲笑我的痴心妄想 提交于 2019-12-23 12:43:22
问题 Im trying to implement a stripe webhook using the the c# library Stripe.net by Jayme Davis. i have set up the test endpoint in the stripe dashboard and generated the secret. The endpoint is being hit fine, and will generate the StripeEvent using the StripeEventUtility.ParseEvent. The problem is with using the ConstructEvent function i cant get the signatures to match. Any help or suggestions would be much appreciated. isSignaturePresent is returning false //call to create event stripeEvent =

Visual signature with pdfbox 1.8.8

不想你离开。 提交于 2019-12-23 09:21:35
问题 I'm trying to produce PDF with visual signature and pdfbox. I have two streams and it seems that pdfbox can deal only with files. I didn't manage to make it work without three temporary files. I can see from here that API has changed, but still it deals with files. public void signPdf(InputStream originalPdf, OutputStream signedPdf, InputStream image, float x, float y, String name, String location, String reason) { File temp = null; File temp2 = null; File scratchFile = null; RandomAccessFile

sign the large message and verify with recover message

℡╲_俬逩灬. 提交于 2019-12-23 05:36:05
问题 I write the following code for signing the message and then verify it, in java by Bouncy Castle. signing work properly but verifying don't work completely. Verifying with short input message work properly but with large input message (larger than 106) don't work properly. In other words when the length of input text for sign becomes large, the verify can not do complete. the result of code print: signature tampered and return partial of the primary message. public static String sigVer

Java plugin replacement for digital signatures

a 夏天 提交于 2019-12-23 04:29:25
问题 We have a custom Java applet that performs certain tasks, like loading a PDF from local filesystem, signing it with certificates from system KeyStore/smart card etc. Such actions are not possible in regular HTML/JavaScript. Now that Java is being deprecated across browsers, we are looking for possibilities to replace the applet functionality. There is this Web Cryptography API, but unfortunately the spec does not cover using system keystore. There is another spec for this, WebCrypto Key

How to digitally sign PDF files with XFA forms using iText

独自空忆成欢 提交于 2019-12-23 04:08:09
问题 iText release notes mention that signing of PDFs with XFA forms is supported from iText versions 5.4.2 and 5.4.3: http://itextpdf.com/history/?branch=54&node=542 http://itextpdf.com/history/?branch=54&node=543 Is there a documentation somewhere how to do the signing in Java? I am specifically interested in signing PDFs with XFA where there is a prepared field for signature. 回答1: This is a small example showing how to sign using XmlDSig: PdfReader reader =new PdfReader(src); FileOutputStream

RSA Signature is different generated from rsa module and m2crypto

半世苍凉 提交于 2019-12-23 03:43:05
问题 I am migrating a service from Python 2.7 to Python 3.5 which communicated with another service using RSA encryption/decryption. Python(v2.7) m2crypto(0.25.1) < Correct Signature > key = M2Crypto.RSA.load_key(private_key) digest = hashlib.sha1(bytes(cipher_text, encoding="UTF-8")).hexdigest() signature = hexlify(key.private_encrypt(digest, M2Crypto.RSA.pkcs1_padding)) Python(v3.5) rsa(v3.4.2) pri_key = rsa.PrivateKey.load_pkcs1(private_key) signature = hexlify(rsa.sign(cipher_text.encode(),

Verifying Digital Signature on Google App Engine

依然范特西╮ 提交于 2019-12-23 03:32:26
问题 I'm using GAE (python) and have to verify a digital signature using a public key (pem format) I cant use M2Crypto (its not supported on GAE) and neither the following code is working: pubKey = pem from Crypto import PublicKey key = PublicKey.RSA.importKey(pubKey) Now, for this code to work we have to have Pycrypto package, which is already there in appengine, still the 'impotkey()' function is giving error Also, I'm unable to find the class RSAImplementation in Pycrypto package in GAE EDIT:

Sign a Pdf using custom digital signature in Java

主宰稳场 提交于 2019-12-23 03:23:21
问题 I've created a digital signature using Sun's code:http://download.oracle.com/javase/tutorial/security/apisign/examples/GenSig.java. How can I sign a pdf file using this digital signature? That is: how can I add the signature to a pdf file? 回答1: You've taken the wrong approach. You can't easily append the signature to the PDF. PDF specification includes support for digital signatures. Those signatures are embedded into the document, and their calculation is a non-trivial process. Your best bet