EldoS | Feel safer!

Software components for data protection, secure storage and transfer

pgp decryption

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#29359
Posted: 05/02/2014 09:48:29
by Shaik Shafe (Basic support level)
Joined: 02/17/2014
Posts: 7

Hi,

I am not able to decrypt the file using below methods on C#.net
getting below error

below is code

keyring = new TElPGPKeyring();

keyring.Load(pubPath, SecPath, true);
pgpReader = new SBPGP.TElPGPReader();
pgpReader.DecryptingKeys = keyring;
pgpReader.VerifyingKeys = keyring;
pgpReader.KeyPassphrase = encryptPwd;
System.IO.FileStream inF ,outF;
inF = new System.IO.FileStream(SourceFile, FileMode.Open);
//outF = new System.IO.FileStream(decryptedFile, System.IO.FileMode.Create);
try
{
yourString = encryptPwd;
pgpReader.DecryptAndVerify(inF, 0);


getting the below error
"No appropriate key for decryption found"

attached the error screen shot.

Request you to please help us on this

Regards,
Shaik Shafe


#29360
Posted: 05/02/2014 09:52:55
by Eugene Mayevski (Team)

The message is self-explaining -- the private key has not been found. Please inspect the keyring after loading it to ensure that the secret key is present there and that it's correct.

Another possible problem is that KeyPassphrase property should be set to the password of the secret key which you plan to use for decryption. Each private key in the keyring is protected with the passphrase, and you need to provide this passphrase.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1941 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!