EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PGP Encrypt using asciI public key supplied by recipient

Posted: 07/16/2012 10:13:23
by Bill Fitzgerald (Standard support level)
Joined: 07/09/2012
Posts: 2

Sorry for the newbie question.
I have an ascii file containing an public key supplied by the recipient.
How do I use that to encrypt a file using openpgp.

All of the examples use key from a key ring, but I don't know how to get the ascii file into a keyring.

I tried to load it but go an error saysing the packetformat was incorrect.


Posted: 07/16/2012 10:32:06
by Eugene Mayevski (Team)

Normally the key should be loaded fine as PGP key file format is the same for keys and keyrings. It's possible that the file itself is not very standard. I'll move your question to the HelpDesk for investigation.

Sincerely yours
Eugene Mayevski
Posted: 07/16/2012 10:47:24
by Ken Ivanov (Team)

Hello Bill,

There's one simple rule to follow: you should always load keys with the use of TElPGPKeyring.Load() method, independently of whether you have a 'full' keyring or an individual key.

TElPGPPublicKey.Load*() methods only work with keys in binary format, so you will get an exceptions is passing armoured keys to them. TElPGPKeyring.Load() understands all existing key formats.
Posted: 07/16/2012 11:05:02
by Bill Fitzgerald (Standard support level)
Joined: 07/09/2012
Posts: 2

Thanks gentelmen
I just needed to know that I could load the key without it being on keyring.

As it turned out, I had mispelled the filename.
Once I corrected the spelling it loaded nicely.

I can't see how to close this topic, so please close it for me.

Thanks again for your prompt reply
Posted: 07/16/2012 12:03:28
by Eugene Mayevski (Team)

That happens ...

Forum topics don't need closing (unlike helpdesk tickets which need manual attention or they will hang around in the helpdesk forever).

Sincerely yours
Eugene Mayevski



Topic viewed 702 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!