delete_key() method can be used to delete a key. Remember, from a private-public key-pair, the private key must be deleted first.
>>> gpg.delete_keys(fp, True) >>> gpg.delete_keys(fp)
This method takes the following arguments:
- fingerprints: key fingerprint
- secret: True for a private key
- subkey: True for subkey
These are the overall methods to use GnuPG in Python. For more details, please refer to the Python documentation. I hope this helps. Interested readers who want to know more about how different cryptographic algorithms and Public Key Infrastructure work may want to refer to the book “Cryptography And Public Key Infrastructure.”










































0 Comments