问题
i want to make a function using python to encrypt password by the public key. at the user end i need to install PGP software which will generate the key pair .i want to use public key only for encryption and private key for decryption. The problem is coming with the encryption function(how to use key for encryption) and also in pgp installing . can somebody tell me the correct way to do this
thanks
回答1:
Here is an open source project for using pgp with python. I think this is what you're looking for.
You actually don't have to invent the algorithms yourself, they're already there.
回答2:
Did you check out PyCrypto?
来源:https://stackoverflow.com/questions/1048722/python-and-pgp-encryption