0

我有受密码保护的 HTML 文件,我正在使用第三方工具 (chilkat) 进行签名。问题是它既没有得到标志也没有给我任何错误。我将如何在我的代码中识别该文件需要密码

这是我的代码

           if (!pcSourceFile.EndsWith(".pdf"))
            {
                byte[] lcReadByte = null;
                pSerialNumber = locertTest.SerialNumber;
                Issuer = locertTest.IssuerCN;
                SignTime = DateTime.Now;
                loCryptoTest.SetSigningCert(locertTest);
                byte[] lcWriteBytes = null;
                lcReadByte = loCryptoTest.ReadFile(pcSourceFile);
                //lcWriteBytes = loCryptoTest.OpaqueSignBytes(lcReadByte);
                lcWriteBytes = loCryptoTest.OpaqueSignBytes(lcReadByte);

                if (lcWriteBytes.Length == 0)
                {

   GlobalStatic.WriteLog(loCryptoTest.LastErrorText, "Opeque Sig nature Error", "Signature");
                    return false;
                }

                loCryptoTest.WriteFile(pcDestFile, lcWriteBytes);
                lcReadByte = null;
                lcWriteBytes = null;

            }
4

0 回答 0