Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# DIDISOFT-解密时打开PGP空指针异常_C#_Pgp - Fatal编程技术网

C# DIDISOFT-解密时打开PGP空指针异常

C# DIDISOFT-解密时打开PGP空指针异常,c#,pgp,C#,Pgp,我正在使用didisoft的OpenPGP加密和解密文件。我有一个加密文件和与加密密钥对应的私钥。但是当我尝试使用DecryptFile()方法时,我得到一个空指针异常。。我想不出是什么问题。任何帮助都将不胜感激。 代码: 该支持请求已在官方网站上处理 DidiSoft产品的主要支持渠道是通过电子邮件发送至support@didisoft.com并保证在格林尼治标准时间下午8:00/CST下午3:00之前对发布的支持请求做出当天响应 有关其他支持方法,请访问。谢谢。快速而有力的支持。大家竖起大拇

我正在使用didisoft的OpenPGP加密和解密文件。我有一个加密文件和与加密密钥对应的私钥。但是当我尝试使用DecryptFile()方法时,我得到一个空指针异常。。我想不出是什么问题。任何帮助都将不胜感激。 代码:


该支持请求已在官方网站上处理

DidiSoft产品的主要支持渠道是通过电子邮件发送至support@didisoft.com并保证在格林尼治标准时间下午8:00/CST下午3:00之前对发布的支持请求做出当天响应


有关其他支持方法,请访问。

谢谢。快速而有力的支持。大家竖起大拇指,谢谢
public void decryptFile(string filename, string destPath)

string password = "xxx";
                string encFile = System.IO.Path.GetTempPath() + filename;
                string keyFile = ConfigurationManager.AppSettings["DecryptKeyFile"].ToString();
                PGPLib pgpDecrypter = new PGPLib();
                File.Create(destPath + filename);
                string a = pgpDecrypter.DecryptFile(encFile, keyFile, password, destPath+filename);  // I get the error on this line