summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-08-01 12:52:39 -0400
committerEli Collins <elic@assurancetechnologies.com>2012-08-01 12:52:39 -0400
commit432fd93f6884036df59007f09dee86adfb7078ad (patch)
tree6b7b702984775a66f73d6831cd2a8749156147ba /docs
parent189346c45a4907479f083c854469a896dcf3b581 (diff)
downloadpasslib-432fd93f6884036df59007f09dee86adfb7078ad.tar.gz
project-wide whitespace & comment cleanup (it's been a couple of years)
Diffstat (limited to 'docs')
-rw-r--r--docs/conf.py66
-rw-r--r--docs/lib/passlib.apps.rst2
-rw-r--r--docs/lib/passlib.context-tutorial.rst2
-rw-r--r--docs/lib/passlib.hash.bcrypt.rst2
-rw-r--r--docs/lib/passlib.hash.cisco_pix.rst8
-rw-r--r--docs/lib/passlib.hash.grub_pbkdf2_sha512.rst6
-rw-r--r--docs/lib/passlib.hash.hex_digests.rst9
-rw-r--r--docs/lib/passlib.hash.ldap_crypt.rst2
-rw-r--r--docs/lib/passlib.hash.msdcc.rst4
-rw-r--r--docs/lib/passlib.hash.mysql323.rst2
-rw-r--r--docs/lib/passlib.hash.oracle10.rst10
-rw-r--r--docs/lib/passlib.hash.oracle11.rst2
-rw-r--r--docs/lib/passlib.hash.postgres_md5.rst2
-rw-r--r--docs/lib/passlib.hash.sun_md5_crypt.rst6
-rw-r--r--docs/lib/passlib.hosts.rst2
-rw-r--r--docs/lib/passlib.registry.rst8
-rw-r--r--docs/lib/passlib.utils.handlers.rst32
-rw-r--r--docs/modular_crypt_format.rst6
-rw-r--r--docs/new_app_quickstart.rst20
19 files changed, 97 insertions, 94 deletions
diff --git a/docs/conf.py b/docs/conf.py
index f1f6f3b..1c8267f 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -15,7 +15,7 @@ import sys, os
options = os.environ.get("PASSLIB_DOCS", "").split(",")
-#make sure passlib in sys.path
+# make sure passlib in sys.path
doc_root = os.path.abspath(os.path.join(__file__,os.path.pardir))
source_root = os.path.abspath(os.path.join(doc_root,os.path.pardir))
sys.path.insert(0, source_root)
@@ -23,14 +23,14 @@ sys.path.insert(0, source_root)
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+##sys.path.insert(0, os.path.abspath('.'))
-#building the docs requires the Cloud sphinx theme & extensions
+# building the docs requires the Cloud sphinx theme & extensions
# https://bitbucket.org/ecollins/cloud_sptheme
-#which contains some sphinx extensions used by passlib
+# which contains some sphinx extensions used by passlib
import cloud_sptheme as csp
-#hack to make autodoc generate documentation from the correct class...
+# hack to make autodoc generate documentation from the correct class...
import passlib.utils.md4 as md4_mod
md4_mod.md4 = md4_mod._builtin_md4
@@ -46,13 +46,13 @@ extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
- #add autdoc support for ReST sections in class/function docstrings
+ # add autdoc support for ReST sections in class/function docstrings
'cloud_sptheme.ext.autodoc_sections',
- #adds extra ids & classes to genindex html, for additional styling
+ # adds extra ids & classes to genindex html, for additional styling
'cloud_sptheme.ext.index_styling',
- #inserts toc into right hand nav bar (ala old style python docs)
+ # inserts toc into right hand nav bar (ala old style python docs)
'cloud_sptheme.ext.relbar_toc',
# replace sphinx :samp: role handler with one that allows escaped {} chars
@@ -91,13 +91,13 @@ version = csp.get_version(release)
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
-#language = None
+##language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
-#today = ''
+##today = ''
# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
+##today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@@ -110,18 +110,18 @@ exclude_patterns = [
]
# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
+##default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
-#add_module_names = True
+##add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
-#show_authors = False
+##show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
@@ -185,37 +185,37 @@ html_last_updated_fmt = '%b %d, %Y'
html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+##html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
-#html_additional_pages = {}
+##html_additional_pages = {}
# If false, no module index is generated.
-#html_domain_indices = True
+##html_domain_indices = True
# If false, no index is generated.
-#html_use_index = True
+##html_use_index = True
# If true, the index is split into individual pages for each letter.
-#html_split_index = False
+##html_split_index = False
# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
+##html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
+##html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
+##html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
+##html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+##html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = project + 'Doc'
@@ -224,10 +224,10 @@ htmlhelp_basename = project + 'Doc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
+##latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
+##latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
@@ -238,26 +238,26 @@ latex_documents = [
# The name of an image file (relative to this directory) to place at the top of
# the title page.
-#latex_logo = None
+##latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
-#latex_use_parts = False
+##latex_use_parts = False
# If true, show page references after internal links.
-#latex_show_pagerefs = False
+##latex_show_pagerefs = False
# If true, show URL addresses after external links.
-#latex_show_urls = False
+##latex_show_urls = False
# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
+##latex_preamble = ''
# Documents to append as an appendix to all manuals.
-#latex_appendices = []
+##latex_appendices = []
# If false, no module index is generated.
-#latex_domain_indices = True
+##latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
diff --git a/docs/lib/passlib.apps.rst b/docs/lib/passlib.apps.rst
index ea47730..dee0125 100644
--- a/docs/lib/passlib.apps.rst
+++ b/docs/lib/passlib.apps.rst
@@ -107,7 +107,7 @@ Passlib provides two contexts related to ldap hashes:
>>> from passlib.apps import ldap_context
>>> ldap_context = ldap_context.replace(default="ldap_salted_md5")
- >>> #the new context object will now default to {SMD5}:
+ >>> # the new context object will now default to {SMD5}:
>>> ldap_context.encrypt("password")
'{SMD5}T9f89F591P3fFh1jz/YtW4aWD5s='
diff --git a/docs/lib/passlib.context-tutorial.rst b/docs/lib/passlib.context-tutorial.rst
index 953bc51..e6d3b1d 100644
--- a/docs/lib/passlib.context-tutorial.rst
+++ b/docs/lib/passlib.context-tutorial.rst
@@ -441,7 +441,7 @@ Applications which choose to use a policy file will typically want
to create the CryptContext at the module level, and then load
the configuration once the application starts:
-1. Within a common module in your application (eg ``myapp.model.security``)::
+1. Within a common module in your application (e.g. ``myapp.model.security``)::
#
# create a crypt context that can be imported and used wherever is needed...
diff --git a/docs/lib/passlib.hash.bcrypt.rst b/docs/lib/passlib.hash.bcrypt.rst
index 1c7fa49..1a2cce7 100644
--- a/docs/lib/passlib.hash.bcrypt.rst
+++ b/docs/lib/passlib.hash.bcrypt.rst
@@ -22,7 +22,7 @@ for new applications. This class can be used directly as follows::
>>> bcrypt.encrypt("password", rounds=8)
'$2a$08$8wmNsdCH.M21f.LSBSnYjQrZ9l1EmtBc9uNPGL.9l75YE8D8FlnZC'
- >>> #verify password
+ >>> # verify password
>>> bcrypt.verify("password", h)
True
>>> bcrypt.verify("wrong", h)
diff --git a/docs/lib/passlib.hash.cisco_pix.rst b/docs/lib/passlib.hash.cisco_pix.rst
index cffd0a1..311409b 100644
--- a/docs/lib/passlib.hash.cisco_pix.rst
+++ b/docs/lib/passlib.hash.cisco_pix.rst
@@ -23,13 +23,13 @@ PIX firewalls. This class can be used directly as follows::
>>> hash
'A5XOy94YKDPXCo7U'
- >>> #verify correct password
+ >>> # verify correct password
>>> pix.verify("password", hash, user="user")
True
- >>> #verify correct password w/ wrong username
+ >>> # verify correct password w/ wrong username
>>> pm.verify("password", hash, user="other")
False
- >>> #verify incorrect password
+ >>> # verify incorrect password
>>> pm.verify("letmein", hash, user="user")
False
@@ -92,7 +92,7 @@ This algorithm is not suitable for *any* use besides manipulating existing
Cisco PIX hashes, due to the following flaws:
* It's use of the username as a salt value (and only the first four characters
- at that), means that common usernames (eg ``admin``, ``cisco``) will occur
+ at that), means that common usernames (e.g. ``admin``, ``cisco``) will occur
more frequently as salts, weakening the effectiveness of the salt in
foiling pre-computed tables.
diff --git a/docs/lib/passlib.hash.grub_pbkdf2_sha512.rst b/docs/lib/passlib.hash.grub_pbkdf2_sha512.rst
index 5f82597..279ac57 100644
--- a/docs/lib/passlib.hash.grub_pbkdf2_sha512.rst
+++ b/docs/lib/passlib.hash.grub_pbkdf2_sha512.rst
@@ -56,16 +56,16 @@ The result is then encoded into hexidecimal.
>>> from passlib.hash import pbkdf2_sha512, grub_pbkdf2_sha512
- >>> #given a pbkdf2_sha512 hash...
+ >>> # given a pbkdf2_sha512 hash...
>>> h = pbkdf2_sha512.encrypt("password")
>>> h
'$pbkdf2-sha512$6400$y6vYff3SihJiqumIrNXwGw$NobVwyUlVI52/Cvrguwli5fX6XgKHNUf7fWWS2VgoWEevaTCiZx4OCYhwGFwzUAuz/g1zQVSIf.9JEb0BEVEEA'
- >>> #it can be parsed into options
+ >>> # it can be parsed into options
>>> hobj = pbkdf2_sha512.from_string(h)
>>> rounds, salt, chk = hobj.rounds, hobj.salt, hobj.checksum
- >>> #and a new grub hash can be created
+ >>> # and a new grub hash can be created
>>> gobj = grub_pbkdf2_sha512(rounds=rounds, salt=salt, checksum=chk)
>>> g = gobj.to_string()
>>> g
diff --git a/docs/lib/passlib.hash.hex_digests.rst b/docs/lib/passlib.hash.hex_digests.rst
index d9d9cb0..0f8f5fd 100644
--- a/docs/lib/passlib.hash.hex_digests.rst
+++ b/docs/lib/passlib.hash.hex_digests.rst
@@ -22,14 +22,17 @@ and can be used directly as follows::
>>> from passlib.hash import hex_sha1 as hex_sha1
- >>> #encrypt password
+ >>> # encrypt password
>>> h = hex_sha1.encrypt("password")
>>> h
'5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8'
- >>> hex_sha1.verify("password", h) #verify correct password
+ >>> # verify correct password
+ >>> hex_sha1.verify("password", h)
True
- >>> hex_sha1.verify("secret", h) #verify incorrect password
+
+ >>> # verify incorrect password
+ >>> hex_sha1.verify("secret", h)
False
.. seealso:: the generic :ref:`PasswordHash usage examples <password-hash-examples>`
diff --git a/docs/lib/passlib.hash.ldap_crypt.rst b/docs/lib/passlib.hash.ldap_crypt.rst
index 2ba7e33..745716f 100644
--- a/docs/lib/passlib.hash.ldap_crypt.rst
+++ b/docs/lib/passlib.hash.ldap_crypt.rst
@@ -56,7 +56,7 @@ Interface
.. class:: ldap_sha512_crypt()
All of these classes have the same interface as their corresponding
- underlying hash (eg :class:`des_crypt`, :class:`md5_crypt`, etc).
+ underlying hash (e.g. :class:`des_crypt`, :class:`md5_crypt`, etc).
.. rubric:: Footnotes
diff --git a/docs/lib/passlib.hash.msdcc.rst b/docs/lib/passlib.hash.msdcc.rst
index 085ebb5..ead1eea 100644
--- a/docs/lib/passlib.hash.msdcc.rst
+++ b/docs/lib/passlib.hash.msdcc.rst
@@ -1,4 +1,4 @@
-.. index::
+.. index::
single: Windows; Domain Cached Credentials
see: mscash; msdcc
see: mscache; msdcc
@@ -83,7 +83,7 @@ This algorithm is should not be used for any purpose besides
manipulating existing DCC v1 hashes, due to the following flaws:
* It's use of the username as a salt value (and lower-case at that),
- means that common usernames (eg ``Administrator``) will occur
+ means that common usernames (e.g. ``Administrator``) will occur
more frequently as salts, weakening the effectiveness of the salt in
foiling pre-computed tables.
diff --git a/docs/lib/passlib.hash.mysql323.rst b/docs/lib/passlib.hash.mysql323.rst
index 8182b8f..80272b4 100644
--- a/docs/lib/passlib.hash.mysql323.rst
+++ b/docs/lib/passlib.hash.mysql323.rst
@@ -27,7 +27,7 @@ That aside, this class can be used as follows::
>>> mysql323.encrypt("password")
'5d2e19393cc5ef67'
- >>> #verify correct password
+ >>> # verify correct password
>>> mysql323.verify("password", '5d2e19393cc5ef67')
True
>>> mysql323.verify("secret", '5d2e19393cc5ef67')
diff --git a/docs/lib/passlib.hash.oracle10.rst b/docs/lib/passlib.hash.oracle10.rst
index 540f086..5d878ba 100644
--- a/docs/lib/passlib.hash.oracle10.rst
+++ b/docs/lib/passlib.hash.oracle10.rst
@@ -16,18 +16,18 @@ a username for all encrypt/verify operations)::
>>> from passlib.hash import oracle10 as oracle10
- >>> #encrypt password using specified username
+ >>> # encrypt password using specified username
>>> hash = oracle10.encrypt("password", user="username")
>>> hash
'872805F3F4C83365'
- >>> #verify correct password
+ >>> # verify correct password
>>> oracle10.verify("password", hash, user="username")
True
- >>> #verify correct password w/ wrong username
+ >>> # verify correct password w/ wrong username
>>> oracle10.verify("password", hash, user="somebody")
False
- >>> #verify incorrect password
+ >>> # verify incorrect password
>>> oracle10.verify("letmein", hash, user="username")
False
@@ -75,7 +75,7 @@ This algorithm it not suitable for *any* use besides manipulating existing
Oracle10 account passwords, due to the following flaws [#flaws]_:
* It's use of the username as a salt value means that common usernames
- (eg ``system``) will occur more frequently as salts,
+ (e.g. ``system``) will occur more frequently as salts,
weakening the effectiveness of the salt in foiling pre-computed tables.
* The fact that it is case insensitive, and simply concatenates the username
diff --git a/docs/lib/passlib.hash.oracle11.rst b/docs/lib/passlib.hash.oracle11.rst
index 8eb8d80..68f21c6 100644
--- a/docs/lib/passlib.hash.oracle11.rst
+++ b/docs/lib/passlib.hash.oracle11.rst
@@ -10,7 +10,7 @@ This class can be can be used directly as follows::
>>> from passlib.hash import oracle11 as oracle11
- >>> #generate new salt, encrypt password
+ >>> # generate new salt, encrypt password
>>> hash = oracle11.encrypt("password")
>>> hash
'S:4143053633E59B4992A8EA17D2FF542C9EDEB335C886EED9C80450C1B4E6'
diff --git a/docs/lib/passlib.hash.postgres_md5.rst b/docs/lib/passlib.hash.postgres_md5.rst
index cddaae1..72144e5 100644
--- a/docs/lib/passlib.hash.postgres_md5.rst
+++ b/docs/lib/passlib.hash.postgres_md5.rst
@@ -53,7 +53,7 @@ This algorithm it not suitable for *any* use besides manipulating existing
PostgreSQL account passwords, due to the following flaws:
* It's use of the username as a salt value means that common usernames
- (eg ``admin``, ``root``, ``postgres``) will occur more frequently as salts,
+ (e.g. ``admin``, ``root``, ``postgres``) will occur more frequently as salts,
weakening the effectiveness of the salt in foiling pre-computed tables.
* Since the keyspace of ``user+password`` is still a subset of ascii characters,
diff --git a/docs/lib/passlib.hash.sun_md5_crypt.rst b/docs/lib/passlib.hash.sun_md5_crypt.rst
index 956cdee..dd9e406 100644
--- a/docs/lib/passlib.hash.sun_md5_crypt.rst
+++ b/docs/lib/passlib.hash.sun_md5_crypt.rst
@@ -134,7 +134,7 @@ The documentation hints that this stems from a bug within the production
implementation's parser. This bug causes the implementation to return
``$$``-format hashes when passed a configuration string that ends with ``$``.
It returns the intended original format & checksum
-only if there is at least one letter after the ``$``, eg :samp:`$md5${salt}$x`.
+only if there is at least one letter after the ``$``, e.g. :samp:`$md5${salt}$x`.
Passlib attempts to accomodate both formats using the special ``bare_salt``
keyword. It is set to ``True`` to indicate a configuration or hash string which
@@ -164,12 +164,12 @@ deviates from the official implementation in the following ways:
* Rounds encoding
- The underlying scheme implicitly allows rounds to have zero padding (eg ``$md5,rounds=001$abc$``),
+ The underlying scheme implicitly allows rounds to have zero padding (e.g. ``$md5,rounds=001$abc$``),
and also allows 0 rounds to be specified two ways (``$md5$abc$`` and ``$md5,rounds=0$abc$``).
Allowing either of these would result in multiple possible checksums
for the same password & salt. To prevent ambiguity,
Passlib will throw a :exc:`ValueError` if the rounds value is zero-padded,
- or specified explicitly as 0 (eg ``$md5,rounds=0$abc$``).
+ or specified explicitly as 0 (e.g. ``$md5,rounds=0$abc$``).
.. _smc-quirks:
diff --git a/docs/lib/passlib.hosts.rst b/docs/lib/passlib.hosts.rst
index 954bf03..cef0335 100644
--- a/docs/lib/passlib.hosts.rst
+++ b/docs/lib/passlib.hosts.rst
@@ -119,7 +119,7 @@ Current Host OS
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.
+ >>> # NOTE/WARNING: this example requires running as root on most systems.
>>> import spwd, os
>>> from passlib.hosts import host_context
>>> hash = spwd.getspnam(os.environ['USER']).sp_pwd
diff --git a/docs/lib/passlib.registry.rst b/docs/lib/passlib.registry.rst
index 6302cb7..2457cb1 100644
--- a/docs/lib/passlib.registry.rst
+++ b/docs/lib/passlib.registry.rst
@@ -41,19 +41,19 @@ Usage
=====
Example showing how to use :func:`!registry_crypt_handler_path`::
- >>> #register the location of a handler without loading it
+ >>> # register the location of a handler without loading it
>>> from passlib.registry import register_crypt_handler_path
>>> register_crypt_handler_path("myhash", "myapp.support.hashes")
- >>> #even before being loaded, it's name will show up as available
+ >>> # even before being loaded, it's name will show up as available
>>> from passlib.registry import list_crypt_handlers
>>> 'myhash' in list_crypt_handlers()
True
>>> 'myhash' in list_crypt_handlers(loaded_only=True)
False
- >>> #when the name "myhash" is next referenced,
- >>> #the class "myhash" will be imported from the module "myapp.support.hashes"
+ >>> # when the name "myhash" is next referenced,
+ >>> # the class "myhash" will be imported from the module "myapp.support.hashes"
>>> from passlib.context import CryptContext
>>> cc = CryptContext(schemes=["myhash"]) #<-- this will cause autoimport
diff --git a/docs/lib/passlib.utils.handlers.rst b/docs/lib/passlib.utils.handlers.rst
index 06028c2..6b4799a 100644
--- a/docs/lib/passlib.utils.handlers.rst
+++ b/docs/lib/passlib.utils.handlers.rst
@@ -170,26 +170,26 @@ of the unittest for :class:`passlib.hash.des_crypt`::
from passlib.hash import des_crypt
from passlib.tests.utils import HandlerCase
- #create a subclass for the handler...
+ # create a subclass for the handler...
class DesCryptTest(HandlerCase):
"test des-crypt algorithm"
- #: [required] - store the handler object itself in the handler attribute
+ # [required] - store the handler object itself in the handler attribute
handler = des_crypt
- #: [optional] - if your hash only uses the first X characters of the password,
- #: set that value here. otherwise leave the default (-1).
+ # [optional] - if your hash only uses the first X characters of the password,
+ # set that value here. otherwise leave the default (-1).
secret_size = 8
- #: [required] - this should be a list of (password, hash) pairs,
- # which should all verify correctly using your handler.
- # it is recommend include pairs which test all of the following:
+ # [required] - this should be a list of (password, hash) pairs,
+ # which should all verify correctly using your handler.
+ # it is recommend include pairs which test all of the following:
#
- # * empty string & short strings for passwords
- # * passwords with 2 byte unicode characters
- # * hashes with varying salts, rounds, and other options
+ # * empty string & short strings for passwords
+ # * passwords with 2 byte unicode characters
+ # * hashes with varying salts, rounds, and other options
known_correct_hashes = (
- #format: (password, hash)
+ # format: (password, hash)
('', 'OgAwTx2l6NADI'),
(' ', '/Hk.VPuwQTXbc'),
('test', 'N1tQbOFcM5fpg'),
@@ -199,13 +199,13 @@ of the unittest for :class:`passlib.hash.des_crypt`::
(u'hell\u00D6', 'saykDgk3BPZ9E'),
)
- #: [optional] - if there are hashes which are similar in format
- #: to your handler, and you want to make sure :meth:`identify`
- #: does not return ``True`` for such hashes,
- #: list them here. otherwise this can be omitted.
+ # [optional] - if there are hashes which are similar in format
+ # to your handler, and you want to make sure :meth:`identify`
+ # does not return ``True`` for such hashes,
+ # list them here. otherwise this can be omitted.
#
known_unidentified_hashes = [
- #bad char in otherwise correctly formatted hash
+ # bad char in otherwise correctly formatted hash
'!gAwTx2l6NADI',
]
diff --git a/docs/modular_crypt_format.rst b/docs/modular_crypt_format.rst
index aa564fb..6457170 100644
--- a/docs/modular_crypt_format.rst
+++ b/docs/modular_crypt_format.rst
@@ -46,7 +46,7 @@ by the modular crypt format hashes found in passlib:
1. Hash strings must use only 7-bit ascii characters.
No known OS or application generates hashes which violate this rule.
- However, some systems (eg Linux's shadow routines) will happily
+ However, some systems (e.g. Linux's shadow routines) will happily
and correctly accept hashes which contain 8-bit characters in their salt.
This is probably a case of "permissive in what you accept,
strict in what you generate".
@@ -58,13 +58,13 @@ by the modular crypt format hashes found in passlib:
Initially, most schemes adhereing to this format
only used a single digit to identify the hash
- (eg ``$1$`` for :class:`!md5_crypt`).
+ (e.g. ``$1$`` for :class:`!md5_crypt`).
Because of this, many systems only look at the first
character when attempting to distinguish hashes.
Despite this, as Unix systems have branched off,
new hashes have been developed which used larger
- identifying strings (eg ``$sha1$`` for :class:`~passlib.hash.sha1_crypt`);
+ identifying strings (e.g. ``$sha1$`` for :class:`~passlib.hash.sha1_crypt`);
so in general identifier strings should not be assumed to use a single character.
3. Hashes should contain only ascii letters ``a``-``z`` and ``A``-``Z``,
diff --git a/docs/new_app_quickstart.rst b/docs/new_app_quickstart.rst
index 4824fac..a036eb5 100644
--- a/docs/new_app_quickstart.rst
+++ b/docs/new_app_quickstart.rst
@@ -16,19 +16,19 @@ and defaults to 40000 hash iterations for increased strength.
For applications which want to quickly add password hashing,
all they need to do is the following::
- >>> #import the context under an app-specific name (so it can easily be replaced later)
+ >>> # import the context under an app-specific name (so it can easily be replaced later)
>>> from passlib.apps import custom_app_context as pwd_context
- >>> #encrypting a password...
+ >>> # encrypting a password...
>>> hash = pwd_context.encrypt("somepass")
- >>> #verifying a password...
+ >>> # verifying a password...
>>> ok = pwd_context.verify("somepass", hash)
- >>> #[optional] encrypting a password for an admin account...
- >>> # the custom_app_context is preconfigured so that
- >>> # if the category is set to "admin" instead of None,
- >>> # it uses a stronger setting of 80000 rounds:
+ >>> # [optional] encrypting a password for an admin account...
+ >>> # the custom_app_context is preconfigured so that
+ >>> # if the category is set to "admin" instead of None,
+ >>> # it uses a stronger setting of 80000 rounds:
>>> hash = pwd_context.encrypt("somepass", category="admin")
For applications which started using this preset, but whose needs
@@ -89,7 +89,7 @@ this matter of concern is what motivated the development of SHA512-Crypt.
As well, its rounds parameter is logarithmically scaled,
making it hard to fine-tune the amount of time taken to verify passwords;
which can be an issue for applications that handle a large number
-of simultaneous logon attempts (eg web apps).
+of simultaneous logon attempts (e.g. web apps).
.. note::
@@ -185,12 +185,12 @@ to manage your hashes, and relating configuration information.
Insert the following code into your application::
#
- #import the CryptContext class, used to handle all hashing...
+ # import the CryptContext class, used to handle all hashing...
#
from passlib.context import CryptContext
#
- #create a single global instance for your app...
+ # create a single global instance for your app...
#
pwd_context = CryptContext(
# replace this list with the hash(es) you wish to support.