iTextSharp.text.pdf.security.LtvVerification.GetSignatureHashKey C# (CSharp) Method

GetSignatureHashKey() private method

private GetSignatureHashKey ( String signatureName ) : PdfName
signatureName String
return PdfName
        private PdfName GetSignatureHashKey(String signatureName)
        {
            PdfDictionary dic = acroFields.GetSignatureDictionary(signatureName);
            PdfString contents = dic.GetAsString(PdfName.CONTENTS);
            byte[] bc = contents.GetOriginalBytes();
            byte[] bt = null;
            if (PdfName.ETSI_RFC3161.Equals(dic.GetAsName(PdfName.SUBFILTER))) {
                Asn1InputStream din = new Asn1InputStream(new MemoryStream(bc));
                Asn1Object pkcs = din.ReadObject();
                bc = pkcs.GetEncoded();
            }
            bt = HashBytesSha1(bc);
            return new PdfName(Utilities.ConvertToHex(bt));
        }