Mastering Development

Digital signatures invalid when I use the iTextSharp

This is my Form – Following are the code – private void btnSign_Click(object sender, EventArgs e) { string sbase64 = richTextBox2.Text; byte[] bytes = System.Convert.FromBase64String(sbase64); PdfReader reader = new PdfReader("F:\\test1.pdf"); FileStream os = new FileStream("F:\\output.pdf", FileMode.Create); IExternalSignatureContainer external1 = new MyExternalSignatureContainer(bytes); MakeSignature.SignDeferred(reader, "Signature1", os, external1); reader.Close(); os.Close(); } private class MyExternalSignatureContainer : IExternalSignatureContainer { protected […]


Nodejs crypto.getHashes() returns an empty array

I was using exceljs’ sheet protection feature when I encountered an error–Error: Hash algorithm ‘sha512′ not supported!. After taking a look into it’s source files I discovered the cause of the error: crypto.getHashes() is returning an empty array. I can’t seem to find a solution nor the reason for the empty array, any ideas? Node […]

Algorithms Development Google

PDF document signing with Google KMS and Entrust certificate

I am trying to make a valid signature in a pdf document by using a certificate from CA (Entrust) generated with a private key from Google KMS (private key never goes out from the KMS). The certificate chain is made as: [entrustCert, intermediate, rootCert] Following the part of the code I am using to make […]