documentation updates

This commit is contained in:
Michael Greene
2017-04-13 13:46:24 -07:00
parent fda1d67f55
commit 5c9eecbbe9
4 changed files with 46 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ Changelog
v0.4.1 v0.4.1
====== ======
Released: |today| Released: April 13, 2017
Bugs Fixed Bugs Fixed
---------- ----------

View File

@@ -50,7 +50,9 @@ Generating a subkey is similar to the process above, except that it requires an
# assuming we already have a primary key, we can generate a new key and add it as a subkey thusly: # assuming we already have a primary key, we can generate a new key and add it as a subkey thusly:
subkey = pgpy.PGPKey.new(PubKeyAlgorithm.RSA, 4096) subkey = pgpy.PGPKey.new(PubKeyAlgorithm.RSA, 4096)
# preferences that are specific to the subkey can be chosen here, otherwise the key will use the primary key's preferences. # preferences that are specific to the subkey can be chosen here
# any preference(s) needed for actions by this subkey that not specified here
# will seamlessly "inherit" from those specified on the selected User ID
key.add_subkey(subkey, usage={KeyFlags.Authentication}) key.add_subkey(subkey, usage={KeyFlags.Authentication})
Loading Keys Loading Keys
@@ -121,6 +123,11 @@ Key unlocking is quite simple::
# enc_key.is_unlocked is now True # enc_key.is_unlocked is now True
... ...
# This form works equivalently, but may be more semantically clear in some cases:
with enc_key.unlock("C0rrectPassphr@se") as ukey:
# ukey is just a reference to enc_key in this case
...
Exporting Keys Exporting Keys
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
@@ -141,4 +148,3 @@ in Python 2::
# ASCII armored # ASCII armored
keystr = str(key) keystr = str(key)

View File

@@ -57,4 +57,3 @@ in Python 2::
# if message is cleartext, this will also properly canonicalize and dash-escape # if message is cleartext, this will also properly canonicalize and dash-escape
# the message text # the message text
msgstr = str(message) msgstr = str(message)

View File

@@ -2,22 +2,56 @@
Installation Installation
************ ************
.. highlight:: bash .. highlight:: console
Platform Specific Notes Platform Specific Notes
======================= =======================
Windows
-------
PGPy has not been formally tested on Windows. I see no reason why it wouldn't work, but your mileage may vary.
If you try it out and run into any issues, please submit bug reports on the `issue tracker <https://github.com/SecurityInnovation/PGPy/issues>`_!
Linux Linux
----- -----
Building PGPy on Linux requires a C compiler, headers for Python, headers for OpenSSL, and libffi. Debian
^^^^^^
PGPy is now in `Debian Sid <https://packages.debian.org/sid/python3-pgpy>`_, and can be installed simply::
$ sudo apt install python3-pgpy
Arch Linux
^^^^^^^^^^
PGPy is available on the `AUR <https://aur.archlinux.org/packages/python-pgpy/>`_
Gentoo
^^^^^^
There are gentoo ebuilds available in the `gentoo branch <https://github.com/SecurityInnovation/PGPy/tree/gentoo>`_
RedHat/CentOS
^^^^^^^^^^^^^
Coming Soon!
Other Linux
^^^^^^^^^^^
Building PGPy on Linux requires a C compiler, headers for Python, headers for OpenSSL, and libffi, to support building Cryptography.
For Debian/Ubuntu, these requirements can be installed like so:: For Debian/Ubuntu, these requirements can be installed like so::
$ sudo apt-get install build-essential libssl-dev libffi-dev python-dev $ sudo apt install build-essential libssl-dev libffi-dev python-dev
You may need to install ``python3-dev`` if you are using PGPy on Python 3. You may need to install ``python3-dev`` if you are using PGPy on Python 3.
For Fedora/RHEL derivatives, the build requirements can be installed like so::
$ sudo yum install gcc libffi-devel python-devel openssl-devel
Mac OS X Mac OS X
-------- --------
@@ -33,4 +67,3 @@ Installation
Once you have the prerequisites specified above, PGPy can be installed from PyPI using pip, like so:: Once you have the prerequisites specified above, PGPy can be installed from PyPI using pip, like so::
$ pip install PGPy $ pip install PGPy