Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/282.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# PGP加密及;PGP解密_C#_Encryption_Bouncycastle_Pgp - Fatal编程技术网

C# PGP加密及;PGP解密

C# PGP加密及;PGP解密,c#,encryption,bouncycastle,pgp,C#,Encryption,Bouncycastle,Pgp,使用BouncyCastle OpenPGP API解密文件时遇到问题。我跟随这篇文章:解密文件。但是,我得到一个错误,该错误指出每当我实例化PGPDecrypt对象时,KeyID不能为null PGPDecrypt test = new PGPDecrypt(@"C:\test\somefile.zip", @"C:\GnuPG\secring.gpg",

使用BouncyCastle OpenPGP API解密文件时遇到问题。我跟随这篇文章:解密文件。但是,我得到一个错误,该错误指出每当我实例化PGPDecrypt对象时,KeyID不能为null

PGPDecrypt test = new PGPDecrypt(@"C:\test\somefile.zip",
                                             @"C:\GnuPG\secring.gpg",
                                             "password",
                                             @"C:\test\test",
                                             @"C:\GnuPG\pubring.asc",
                                             666362230);
            FileStream fs = File.Open(@"C:\test\somefile.zip", FileMode.Open);
            test.decrypt(fs,@"C:\test\test");
我在Gpg4Win工具集上使用Kleopatra创建密钥

在PGPDecrypt类中,当PGPKeys对象被实例化(特别是PgpPublicKey对象)时,我得到一个错误,该错误声明KeyID不能为null。有人能帮忙吗


非常感谢你

这是一个关于bouncy castle的dev crypto邮件列表中通常会询问和询问此类问题的快速评论。这是一个关于bouncy castle的dev crypto邮件列表中通常会询问和询问此类问题的快速评论。