![]() ![]() ![]() The home directory shouldn't really matter, unless you decide later you want to manage a complete key ring. Obviously don't set output to anything you don't mind overwriting, and you'll need to send the result to your recipient to ensure they can decrypt it. So you just call encrypt and pass in the path to your key file, the path to your source (plaintext) file, and the path where you want it to save the cyphertext. Result = gpg.encrypt_file(f, keys.fingerprints, output=dst) Home = os.path.join(os.getcwd(), "gnupg") Ok, based on everything you've said, and a very cursory look at python-gnupg, I think you might want to try something like this: import os, gnupg Instead then someone has made a substantial mistake. If for some reason the file they've given you says: -BEGIN RSA PRIVATE KEY. You'll transmit the ciphertext to them, then they'll decode by loading in their private key and using the same padding. You'll then encode using the code and padding in the examples above, importing just your portion of the key pair to do that. pem) format or say SSL format or what have you (depending on how they're generating their key pair they get a number of options). They'll then export the public key, which will usually look something something like: -BEGIN PUBLIC KEY-Īnd they should be able to tell you that it's part of an RSA key pair, and if it's in standard (. In theory whoever you're attempting to send to will have created a RSA key pair, usually in. Wait, which file after you encrypt it? And how are you encrypting it? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |