Encrypt a text file using PGP

View: New views
1 Messages — Rating Filter:   Alert me  

Encrypt a text file using PGP

by Nathan Welch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can anyone describe to me how (if possible) to use cryptlib to encrypt a text file using PGP with a static public key?

Ultimately what I am trying to do is hard code a public key into my program so that the same private key will always be able to decrypt the data. I have been banging me head against this for 3 or 4 days and cannot see a way to define the public (or private key) within the program.

I have read the entire text file into a cstring which I can envelope and push correctly. Can anyone give me code examples or a push in the right direction on how to generate a public and private key and then statically program them into my code?

I am aware of the security implications of this and mainly doing it for research purposes.

Thanks in advance,
Nathan

_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.