开发者

PGP Encryption & PGP Decryption

开发者 https://www.devze.com 2023-03-04 06:37 出处:网络
I\'m having trouble decrypting files using the BouncyCastle OpenPGP API. I followed this post: http://rafayal.blogspot.com/2009/06/pgp-decryption-with-c.html to decrypt files. How开发者_高级运维ever,

I'm having trouble decrypting files using the BouncyCastle OpenPGP API. I followed this post: http://rafayal.blogspot.com/2009/06/pgp-decryption-with-c.html to decrypt files. How开发者_高级运维ever, I am getting an error that states that the KeyID cannot be null whenever I instantiate the PGPDecrypt object.

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");

I'm creating the key using Kleopatra on the Gpg4Win tool set.

Within the PGPDecrypt class, when the PGPKeys object is being instantiate (specifically the PgpPublicKey object) , I am getting the error that states that the KeyID cannot be null. Can some body please help.

Thank you so much.

0

精彩评论

暂无评论...
验证码 换一张
取 消