From 3e82afc65a2ff7bc15cb6ecd2a4dd9fab80c207a Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Thu, 5 May 2011 00:24:51 -0400 Subject: fixed some awkward sentences in docs --- docs/lib/passlib.hosts.rst | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'docs/lib/passlib.hosts.rst') diff --git a/docs/lib/passlib.hosts.rst b/docs/lib/passlib.hosts.rst index 163e1e6..08538fd 100644 --- a/docs/lib/passlib.hosts.rst +++ b/docs/lib/passlib.hosts.rst @@ -78,13 +78,19 @@ Current Host OS :platform: Unix - It should support all the algorithms the native OS :func:`!crypt` will support. - The main difference is that it provides introspection about *which* schemes - are available on a given system, as well as defaulting to the strongest - algorithm and decent number of rounds when encrypting new passwords - (whereas :func:`!crypt` invariably defaults to using :mod:`~passlib.hash.des_crypt`). - - This can be used in conjunction with stdlib's :mod:`!spwd` module + This :class:`~passlib.context.CryptContext` instance should detect and support + all the algorithms the native OS :func:`!crypt` offers. + The main differences between this object and :func:`!crypt`: + + * this object provides introspection about *which* schemes + are available on a given system (via ``host_context.policy.schemes()``). + * it defaults to the strongest algorithm available, + automatically configured to an appropriate strength + for encrypting new passwords. + * whereas :func:`!crypt` typically defaults to using + :mod:`~passlib.hash.des_crypt`; and provides little introspection. + + As an example, this can be used in conjunction with stdlib's :mod:`!spwd` module to verify user passwords on the local system:: >>> #NOTE/WARNING: this example requires running as root on most systems. @@ -98,7 +104,6 @@ Current Host OS This object is only available on systems where the stdlib :mod:`!crypt` module is present. In version 1.3 and earlier, it was available on non-Unix systems, though it did nothing useful. - References ========== -- cgit v1.2.1