From 3f6e21e9ab647bd95747a608be79d9d1834b694c Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Thu, 20 Sep 2012 12:59:25 -0400 Subject: updated to use cloud_sptheme 1.5 -- fancier table layouts --- docs/conf.py | 3 ++ docs/index.rst | 24 +++++++------ docs/install.rst | 2 +- docs/lib/passlib.context-tutorial.rst | 10 ++---- docs/lib/passlib.context.rst | 16 +++++---- docs/modular_crypt_format.rst | 63 ++++++++++++++++++++--------------- 6 files changed, 65 insertions(+), 53 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b269161..b4c7f16 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,6 +65,9 @@ extensions = [ # add "issue" role 'cloud_sptheme.ext.issue_tracker', + + # allow table column alignment styling + 'cloud_sptheme.ext.table_styling', ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/index.rst b/docs/index.rst index 1d8641b..270fcba 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -107,13 +107,17 @@ Other Documents Online Resources ================ - ================ =================================================== - Homepage: ``_ - Online Docs: ``_ - Discussion: ``_ - ---------------- --------------------------------------------------- - ---------------- --------------------------------------------------- - PyPI: ``_ - Downloads: ``_ - Source: ``_ - ================ =================================================== + .. table:: + :class: fullwidth + :column-alignment: lr + + ================ =================================================== + Homepage: ``_ + Online Docs: ``_ + Discussion: ``_ + ---------------- --------------------------------------------------- + ---------------- --------------------------------------------------- + PyPI: ``_ + Downloads: ``_ + Source: ``_ + ================ =================================================== diff --git a/docs/install.rst b/docs/install.rst index c4b728c..c9ec13e 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -87,7 +87,7 @@ If you wish to generate your own copy of the documentation, you will need to: 1. Install `Sphinx `_ (1.1 or newer) -2. Install the `Cloud Sphinx Theme `_ (1.4 or newer). +2. Install the `Cloud Sphinx Theme `_ (1.5 or newer). 3. Download the Passlib source 4. From the Passlib source directory, run :samp:`python setup.py build_sphinx`. 5. Once Sphinx completes it's run, point a web browser to the file at :samp:`{SOURCE}/build/sphinx/html/index.html` diff --git a/docs/lib/passlib.context-tutorial.rst b/docs/lib/passlib.context-tutorial.rst index e6d3b1d..e3c3ee9 100644 --- a/docs/lib/passlib.context-tutorial.rst +++ b/docs/lib/passlib.context-tutorial.rst @@ -31,6 +31,8 @@ with some simple examples, and working up to a complex "full-integration" exampl .. index:: CryptContext; usage examples +.. rst-class:: emphasize-children + Tutorial / Walkthrough ====================== * `Basic Usage`_ @@ -46,8 +48,6 @@ Tutorial / Walkthrough .. _context-basic-example: -.. rst-class:: emphasized - Basic Usage ----------- At it's base, the :class:`!CryptContext` class is just a list of @@ -111,8 +111,6 @@ which probably provide a better argument for *why* you'd want to use it. .. _context-default-settings-example: -.. rst-class:: emphasized - Using Default Settings ---------------------- While encrypting and verifying hashes is useful enough, it's not much @@ -166,8 +164,6 @@ These is done by passing the CryptContext constructor a keyword with the format .. _context-serialization-example: -.. rst-class:: emphasized - Loading & Saving a CryptContext ------------------------------- The previous example built up a :class:`!CryptContext` instance @@ -234,8 +230,6 @@ policies from the code, and into a configuration file with other security settin .. _context-migration-example: -.. rst-class:: emphasized - Deprecation & Hash Migration ---------------------------- The final and possibly most useful feature of the :class:`CryptContext` class diff --git a/docs/lib/passlib.context.rst b/docs/lib/passlib.context.rst index fad4b1f..ec17bc5 100644 --- a/docs/lib/passlib.context.rst +++ b/docs/lib/passlib.context.rst @@ -16,6 +16,8 @@ and helper utilities. * :ref:`CryptContext Overview & Tutorial ` -- overview of this class and walkthrough of how to use it. +.. rst-class:: emphasize-children + The CryptContext Class ====================== .. class:: CryptContext(schemes=None, \*\*kwds) @@ -42,7 +44,7 @@ The CryptContext Class .. index:: CryptContext; keyword options -.. rst-class:: html-toggle expanded emphasized +.. rst-class:: html-toggle expanded Constructor Keywords -------------------- @@ -334,7 +336,7 @@ For example, a CryptContext could be set up as follows:: '$5$rounds=88000$w7XIdKfTI9.YLwmA$MIzGvs6NU1QOQuuDHhICLmDsdW/t94Bbdfxdh/6NJl7' ^^^^^ -.. rst-class:: html-toggle expanded emphasized +.. rst-class:: html-toggle expanded Primary Methods --------------- @@ -358,7 +360,7 @@ style methods provided by all the :class:`~passlib.ifc.PasswordHash` objects: .. automethod:: CryptContext.genhash .. automethod:: CryptContext.genconfig -.. rst-class:: html-toggle expanded emphasized +.. rst-class:: html-toggle expanded Hash Migration -------------- @@ -370,7 +372,7 @@ hashes will want to use one of the following methods: .. automethod:: CryptContext.needs_update .. automethod:: CryptContext.hash_needs_update -.. rst-class:: html-toggle expanded emphasized +.. rst-class:: html-toggle expanded Alternate Constructors ---------------------- @@ -381,7 +383,7 @@ as a set of keywords, there are the following alternate constructors: .. automethod:: CryptContext.from_path .. automethod:: CryptContext.copy -.. rst-class:: html-toggle expanded emphasized +.. rst-class:: html-toggle expanded Changing the Configuration -------------------------- @@ -393,7 +395,7 @@ This is done through three methods: .. automethod:: CryptContext.load .. automethod:: CryptContext.load_path -.. rst-class:: html-toggle expanded emphasized +.. rst-class:: html-toggle expanded Examining the Configuration --------------------------- @@ -404,7 +406,7 @@ current configuration: .. automethod:: CryptContext.default_scheme .. automethod:: CryptContext.handler -.. rst-class:: html-toggle expanded emphasized +.. rst-class:: html-toggle expanded Saving the Configuration ------------------------ diff --git a/docs/modular_crypt_format.rst b/docs/modular_crypt_format.rst index a88297e..55e9aa3 100644 --- a/docs/modular_crypt_format.rst +++ b/docs/modular_crypt_format.rst @@ -129,27 +129,31 @@ OS Defined Hashes The following table lists of all the major MCF hashes supported by Passlib, and indicates which operating systems offer native support: -==================================== ==================== =========== =========== =========== =========== ======= -Scheme Prefix Linux FreeBSD NetBSD OpenBSD Solaris -==================================== ==================== =========== =========== =========== =========== ======= -:class:`~passlib.hash.des_crypt` y y y y y -:class:`~passlib.hash.bsdi_crypt` ``_`` y y y -:class:`~passlib.hash.md5_crypt` ``$1$`` y y y y y -:class:`~passlib.hash.bcrypt` ``$2$``, ``$2a$``, - ``$2x$``, ``$2y$`` y y y y -:class:`~passlib.hash.bsd_nthash` ``$3$`` y -:class:`~passlib.hash.sha256_crypt` ``$5$`` y 8.3+ y -:class:`~passlib.hash.sha512_crypt` ``$6$`` y 8.3+ y -:class:`~passlib.hash.sun_md5_crypt` ``$md5$``, ``$md5,`` y -:class:`~passlib.hash.sha1_crypt` ``$sha1$`` y -==================================== ==================== =========== =========== =========== =========== ======= +.. table:: + :column-alignment: llccccc + :column-wrapping: nn + + ==================================== ==================== =========== =========== =========== =========== ======= + Scheme Prefix Linux FreeBSD NetBSD OpenBSD Solaris + ==================================== ==================== =========== =========== =========== =========== ======= + :class:`~passlib.hash.des_crypt` y y y y y + :class:`~passlib.hash.bsdi_crypt` ``_`` y y y + :class:`~passlib.hash.md5_crypt` ``$1$`` y y y y y + :class:`~passlib.hash.bcrypt` ``$2$``, ``$2a$``, + ``$2x$``, ``$2y$`` y y y y + :class:`~passlib.hash.bsd_nthash` ``$3$`` y + :class:`~passlib.hash.sha256_crypt` ``$5$`` y 8.3+ y + :class:`~passlib.hash.sha512_crypt` ``$6$`` y 8.3+ y + :class:`~passlib.hash.sun_md5_crypt` ``$md5$``, ``$md5,`` y + :class:`~passlib.hash.sha1_crypt` ``$sha1$`` y + ==================================== ==================== =========== =========== =========== =========== ======= Additional Platforms -------------------- The modular crypt format is also supported to some degree by the following operating systems and platforms: -.. rst-class:: html-plain-table +.. rst-class:: plain ===================== ============================================================== **MacOS X** Darwin's native :func:`!crypt` provides limited functionality, @@ -168,18 +172,23 @@ The following table lists the other MCF hashes supported by Passlib. These hashes can be found in various libraries and applications (and are not natively supported by any known OS): -=========================================== =================== =========================== -Scheme Prefix Primary Use (if known) -=========================================== =================== =========================== -:class:`~passlib.hash.apr_md5_crypt` ``$apr1$`` Apache htdigest files -:class:`~passlib.hash.phpass` ``$P$``, ``$H$`` PHPass-based applications -:class:`~passlib.hash.pbkdf2_sha1` ``$pbkdf2$`` Passlib-specific -:class:`~passlib.hash.pbkdf2_sha256` ``$pbkdf2-sha256$`` Passlib-specific -:class:`~passlib.hash.pbkdf2_sha512` ``$pbkdf2-sha512$`` Passlib-specific -:class:`~passlib.hash.scram` ``$scram$`` Passlib-specific -:class:`~passlib.hash.cta_pbkdf2_sha1` ``$p5k2$`` [#cta]_ -:class:`~passlib.hash.dlitz_pbkdf2_sha1` ``$p5k2$`` [#cta]_ -=========================================== =================== =========================== +.. table:: + :class: fullwidth + :widths: 1 1 2 + :column-wrapping: nn + + =========================================== =================== =========================== + Scheme Prefix Primary Use (if known) + =========================================== =================== =========================== + :class:`~passlib.hash.apr_md5_crypt` ``$apr1$`` Apache htdigest files + :class:`~passlib.hash.phpass` ``$P$``, ``$H$`` PHPass-based applications + :class:`~passlib.hash.pbkdf2_sha1` ``$pbkdf2$`` Passlib-specific + :class:`~passlib.hash.pbkdf2_sha256` ``$pbkdf2-sha256$`` Passlib-specific + :class:`~passlib.hash.pbkdf2_sha512` ``$pbkdf2-sha512$`` Passlib-specific + :class:`~passlib.hash.scram` ``$scram$`` Passlib-specific + :class:`~passlib.hash.cta_pbkdf2_sha1` ``$p5k2$`` [#cta]_ + :class:`~passlib.hash.dlitz_pbkdf2_sha1` ``$p5k2$`` [#cta]_ + =========================================== =================== =========================== .. rubric:: Footnotes -- cgit v1.2.1