diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2013-12-27 13:49:41 -0500 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2013-12-27 13:49:41 -0500 |
| commit | bcdf0cd2a97fa8dfb4cc06352faa0934ccbf236b (patch) | |
| tree | 36c3549889c3d8bf8f531b30bb588920c23cc681 /passlib | |
| parent | 10ddd0c4bf75c21bdd75a3cb0781f020147778b3 (diff) | |
| download | passlib-bcdf0cd2a97fa8dfb4cc06352faa0934ccbf236b.tar.gz | |
massive cleanup of documentation typos, thanks to Thomas Waldmann (issue 27, comment 7) (transplant of r1f5b8860b743 from default branch)
Diffstat (limited to 'passlib')
| -rw-r--r-- | passlib/apache.py | 2 | ||||
| -rw-r--r-- | passlib/context.py | 22 | ||||
| -rw-r--r-- | passlib/exc.py | 2 | ||||
| -rw-r--r-- | passlib/ext/django/models.py | 4 | ||||
| -rw-r--r-- | passlib/ext/django/utils.py | 2 | ||||
| -rw-r--r-- | passlib/handlers/cisco.py | 2 | ||||
| -rw-r--r-- | passlib/handlers/digests.py | 6 | ||||
| -rw-r--r-- | passlib/handlers/misc.py | 2 | ||||
| -rw-r--r-- | passlib/handlers/oracle.py | 2 | ||||
| -rw-r--r-- | passlib/handlers/phpass.py | 2 | ||||
| -rw-r--r-- | passlib/handlers/windows.py | 6 | ||||
| -rw-r--r-- | passlib/registry.py | 4 | ||||
| -rw-r--r-- | passlib/tests/test_context.py | 2 | ||||
| -rw-r--r-- | passlib/utils/__init__.py | 6 | ||||
| -rw-r--r-- | passlib/utils/_blowfish/__init__.py | 6 | ||||
| -rw-r--r-- | passlib/utils/des.py | 4 | ||||
| -rw-r--r-- | passlib/utils/handlers.py | 8 | ||||
| -rw-r--r-- | passlib/utils/md4.py | 2 | ||||
| -rw-r--r-- | passlib/utils/pbkdf2.py | 2 | ||||
| -rw-r--r-- | passlib/win32.py | 2 |
20 files changed, 44 insertions, 44 deletions
diff --git a/passlib/apache.py b/passlib/apache.py index 8497ca2..c0841f3 100644 --- a/passlib/apache.py +++ b/passlib/apache.py @@ -464,7 +464,7 @@ class HtpasswdFile(_CommonFile): This option may be used to add support for non-standard hash formats to an htpasswd file. However, the resulting file - will probably not be usuable by another application, + will probably not be usable by another application, and particularly not by Apache. :param autoload: diff --git a/passlib/context.py b/passlib/context.py index 4f7ec13..827a215 100644 --- a/passlib/context.py +++ b/passlib/context.py @@ -77,7 +77,7 @@ class CryptPolicy(object): """ .. deprecated:: 1.6 This class has been deprecated, and will be removed in Passlib 1.8. - All of it's functionality has been rolled into :class:`CryptContext`. + All of its functionality has been rolled into :class:`CryptContext`. This class previously stored the configuration options for the CryptContext class. In the interest of interface simplification, @@ -974,7 +974,7 @@ class _CryptConfig(object): """parses, validates, and stores CryptContext config this is a helper used internally by CryptContext to handle - parsing, validation, and serialization of it's config options. + parsing, validation, and serialization of its config options. split out from the main class, but not made public since that just complicates interface too much (c.f. CryptPolicy) @@ -1339,7 +1339,7 @@ class _CryptConfig(object): """return composite dict of options for given scheme + category. this is currently a private method, though some variant - of it's output may eventually be made public. + of its output may eventually be made public. given a scheme & category, it returns two things: a set of all the keyword options to pass to the _CryptRecord constructor, @@ -1769,7 +1769,7 @@ class CryptContext(object): This function is a wrapper for :meth:`load` which loads a configuration string from the local file *path*, - instead of an in-memory source. It's behavior and options + instead of an in-memory source. Its behavior and options are otherwise identical to :meth:`!load` when provided with an INI-formatted string. @@ -1812,7 +1812,7 @@ class CryptContext(object): * another :class:`!CryptContext` object. - this will export a snapshot of it's configuration + this will export a snapshot of its configuration using :meth:`to_dict`. :type update: bool @@ -2240,7 +2240,7 @@ class CryptContext(object): # which are optimized for the specific (scheme,category) configuration. # # The record objects are cached inside the _CryptConfig - # instance stored in self._config, and are retreived + # instance stored in self._config, and are retrieved # via get_record() and identify_record(). # # _get_record() and _identify_record() are references @@ -2354,7 +2354,7 @@ class CryptContext(object): :param \*\*settings: All additional keywords are passed to the appropriate handler, - and should match it's :attr:`~passlib.ifc.PasswordHash.setting_kwds`. + and should match its :attr:`~passlib.ifc.PasswordHash.setting_kwds`. :returns: A configuration string suitable for passing to :meth:`~CryptContext.genhash`, @@ -2398,7 +2398,7 @@ class CryptContext(object): :param \*\*kwds: All additional keywords are passed to the appropriate handler, - and should match it's :attr:`~passlib.ifc.PasswordHash.context_kwds`. + and should match its :attr:`~passlib.ifc.PasswordHash.context_kwds`. :returns: The secret as encoded by the specified algorithm and options. @@ -2526,7 +2526,7 @@ class CryptContext(object): :param \*\*kwds: All additional keywords are passed to the appropriate handler, - and should match it's :attr:`~passlib.ifc.PasswordHash.context_kwds`. + and should match its :attr:`~passlib.ifc.PasswordHash.context_kwds`. :returns: ``True`` if the password matched the hash, else ``False``. @@ -2628,8 +2628,8 @@ class LazyCryptContext(CryptContext): This is a subclass of CryptContext which takes in a set of arguments exactly like CryptContext, but won't load any handlers - (or even parse it's arguments) until - the first time one of it's methods is accessed. + (or even parse its arguments) until + the first time one of its methods is accessed. :arg schemes: The first positional argument can be a list of schemes, or omitted, diff --git a/passlib/exc.py b/passlib/exc.py index 8d872a7..60dae90 100644 --- a/passlib/exc.py +++ b/passlib/exc.py @@ -86,7 +86,7 @@ class PasslibRuntimeWarning(PasslibWarning): """Warning issued when something unexpected happens during runtime. The fact that it's a warning instead of an error means Passlib - was able to correct for the issue, but that it's anonmalous enough + was able to correct for the issue, but that it's anomalous enough that the developers would love to hear under what conditions it occurred. .. versionadded:: 1.6 diff --git a/passlib/ext/django/models.py b/passlib/ext/django/models.py index 6c4d245..a202c93 100644 --- a/passlib/ext/django/models.py +++ b/passlib/ext/django/models.py @@ -61,7 +61,7 @@ def _apply_patch(): FORMS_PATH = "django.contrib.auth.forms" # - # import UNUSUABLE_PASSWORD and is_password_usuable() helpers + # import UNUSABLE_PASSWORD and is_password_usable() helpers # (providing stubs for older django versions) # if VERSION < (1,4): @@ -161,7 +161,7 @@ def _apply_patch(): @_manager.monkeypatch(MODELS_PATH) def check_password(password, encoded, setter=None, preferred="default"): "passlib replacement for check_password()" - # XXX: this currently ignores "preferred" keyword, since it's purpose + # XXX: this currently ignores "preferred" keyword, since its purpose # was for hash migration, and that's handled by the context. if not is_valid_secret(password) or not is_password_usable(encoded): return False diff --git a/passlib/ext/django/utils.py b/passlib/ext/django/utils.py index 161212b..1a05c14 100644 --- a/passlib/ext/django/utils.py +++ b/passlib/ext/django/utils.py @@ -259,7 +259,7 @@ def _get_hasher(algorithm): # we haven't patched django, so just import directly from django.contrib.auth.hashers import get_hasher else: - # we've patched django, so have to use patch manager to retreive + # we've patched django, so have to use patch manager to retrieve # original get_hasher() function... get_hasher = module._manager.getorig("django.contrib.auth.hashers:get_hasher") return get_hasher(algorithm) diff --git a/passlib/handlers/cisco.py b/passlib/handlers/cisco.py index b1d25b5..947c88e 100644 --- a/passlib/handlers/cisco.py +++ b/passlib/handlers/cisco.py @@ -109,7 +109,7 @@ class cisco_type7(uh.GenericHandler): will be issued instead. Correctable errors include ``salt`` values that are out of range. - Note that while this class outputs digests in upper-case hexidecimal, + Note that while this class outputs digests in upper-case hexadecimal, it will accept lower-case as well. This class also provides the following additional method: diff --git a/passlib/handlers/digests.py b/passlib/handlers/digests.py index f1a21bd..dd8400c 100644 --- a/passlib/handlers/digests.py +++ b/passlib/handlers/digests.py @@ -24,10 +24,10 @@ __all__ = [ ] #============================================================================= -# helpers for hexidecimal hashes +# helpers for hexadecimal hashes #============================================================================= class HexDigestHash(uh.StaticHandler): - "this provides a template for supporting passwords stored as plain hexidecimal hashes" + "this provides a template for supporting passwords stored as plain hexadecimal hashes" #=================================================================== # class attrs #=================================================================== @@ -60,7 +60,7 @@ def create_hex_hash(hash, digest_name, module=__name__): __module__=module, # so ABCMeta won't clobber it _hash_func=staticmethod(hash), # sometimes it's a function, sometimes not. so wrap it. checksum_size=h.digest_size*2, - __doc__="""This class implements a plain hexidecimal %s hash, and follows the :ref:`password-hash-api`. + __doc__="""This class implements a plain hexadecimal %s hash, and follows the :ref:`password-hash-api`. It supports no optional or contextual keywords. """ % (digest_name,) diff --git a/passlib/handlers/misc.py b/passlib/handlers/misc.py index e7f8fe1..a89ac72 100644 --- a/passlib/handlers/misc.py +++ b/passlib/handlers/misc.py @@ -37,7 +37,7 @@ class unix_fallback(uh.StaticHandler): all passwords will be allowed through if the hash is an empty string. .. deprecated:: 1.6 - This has been deprecated due to it's "wildcard" feature, + This has been deprecated due to its "wildcard" feature, and will be removed in Passlib 1.8. Use :class:`unix_disabled` instead. """ name = "unix_fallback" diff --git a/passlib/handlers/oracle.py b/passlib/handlers/oracle.py index b826520..3cd3ba1 100644 --- a/passlib/handlers/oracle.py +++ b/passlib/handlers/oracle.py @@ -113,7 +113,7 @@ class oracle11(uh.HasSalt, uh.GenericHandler): :param salt: Optional salt string. If not specified, one will be autogenerated (this is recommended). - If specified, it must be 20 hexidecimal characters. + If specified, it must be 20 hexadecimal characters. :type relaxed: bool :param relaxed: diff --git a/passlib/handlers/phpass.py b/passlib/handlers/phpass.py index 45bd9a6..c1e8a5f 100644 --- a/passlib/handlers/phpass.py +++ b/passlib/handlers/phpass.py @@ -47,7 +47,7 @@ class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler): :type ident: str :param ident: - phpBB3 uses ``H`` instead of ``P`` for it's identifier, + phpBB3 uses ``H`` instead of ``P`` for its identifier, this may be set to ``H`` in order to generate phpBB3 compatible hashes. it defaults to ``P``. diff --git a/passlib/handlers/windows.py b/passlib/handlers/windows.py index 3bc3e4f..3f911be 100644 --- a/passlib/handlers/windows.py +++ b/passlib/handlers/windows.py @@ -40,7 +40,7 @@ class lmhash(uh.HasEncodingContext, uh.StaticHandler): calculating digest. It defaults to ``cp437``, the most common encoding encountered. - Note that while this class outputs digests in lower-case hexidecimal, + Note that while this class outputs digests in lower-case hexadecimal, it will accept upper-case as well. """ #=================================================================== @@ -116,7 +116,7 @@ class nthash(uh.StaticHandler): The :meth:`~passlib.ifc.PasswordHash.encrypt` and :meth:`~passlib.ifc.PasswordHash.genconfig` methods accept no optional keywords. - Note that while this class outputs lower-case hexidecimal digests, + Note that while this class outputs lower-case hexadecimal digests, it will accept upper-case digests as well. """ #=================================================================== @@ -228,7 +228,7 @@ class msdcc(uh.HasUserContext, uh.StaticHandler): This keyword is case-insensitive, and should contain just the username (e.g. ``Administrator``, not ``SOMEDOMAIN\\Administrator``). - Note that while this class outputs lower-case hexidecimal digests, + Note that while this class outputs lower-case hexadecimal digests, it will accept upper-case digests as well. """ name = "msdcc" diff --git a/passlib/registry.py b/passlib/registry.py index 938bc5e..c83387d 100644 --- a/passlib/registry.py +++ b/passlib/registry.py @@ -338,7 +338,7 @@ def get_crypt_handler(name, default=_UNSET): mod = __import__(modname, fromlist=[modattr], level=0) # first check if importing module triggered register_crypt_handler(), - # (this is discouraged due to it's magical implicitness) + # (this is discouraged due to its magical implicitness) handler = _handlers.get(name) if handler: # XXX: issue deprecation warning here? @@ -394,7 +394,7 @@ def _unload_handler_name(name, locations=True): used only by the unittests. if loaded handler is found with specified name, it's removed. - if path to lazy load handler is found, its' removed. + if path to lazy load handler is found, it's removed. missing names are a noop. diff --git a/passlib/tests/test_context.py b/passlib/tests/test_context.py index cdd8746..650124a 100644 --- a/passlib/tests/test_context.py +++ b/passlib/tests/test_context.py @@ -297,7 +297,7 @@ sha512_crypt__min_rounds = 45000 def test_10_load(self): "test load() / load_path() method" # NOTE: load() is the workhorse that handles all policy parsing, - # compilation, and validation. most of it's features are tested + # compilation, and validation. most of its features are tested # elsewhere, since all the constructors and modifiers are just # wrappers for it. diff --git a/passlib/utils/__init__.py b/passlib/utils/__init__.py index 654124e..ef1a962 100644 --- a/passlib/utils/__init__.py +++ b/passlib/utils/__init__.py @@ -253,7 +253,7 @@ def consteq(left, right): The purpose of this function is to help prevent timing attacks during digest comparisons: the standard ``==`` operator aborts - after the first mismatched character, causing it's runtime to be + after the first mismatched character, causing its runtime to be proportional to the longest prefix shared by the two inputs. If an attacker is able to predict and control one of the two inputs, repeated queries can be leveraged to reveal information about @@ -671,7 +671,7 @@ class Base64Engine(object): A string of 64 unique characters, which will be used to encode successive 6-bit chunks of data. A character's position within the string should correspond - to it's 6-bit value. + to its 6-bit value. :param big: Whether the encoding should be big-endian (default False). @@ -1457,7 +1457,7 @@ def genseed(value=None): # if caller specified a seed value, mix it in value, - # if caller's seed value was an RNG, mix in bits from it's state + # if caller's seed value was an RNG, mix in bits from its state value.getrandbits(1<<15) if hasattr(value, "getrandbits") else None, # add current process id diff --git a/passlib/utils/_blowfish/__init__.py b/passlib/utils/_blowfish/__init__.py index 16b8544..44c48ab 100644 --- a/passlib/utils/_blowfish/__init__.py +++ b/passlib/utils/_blowfish/__init__.py @@ -18,11 +18,11 @@ This package contains two submodules: Status ------ -This implementation is usuable, but is an order of magnitude too slow to be -usuable with real security. For "ok" security, BCrypt hashes should have at +This implementation is usable, but is an order of magnitude too slow to be +usable with real security. For "ok" security, BCrypt hashes should have at least 2**11 rounds (as of 2011). Assuming a desired response time <= 100ms, this means a BCrypt implementation should get at least 20 rounds/ms in order -to be both usuable *and* secure. On a 2 ghz cpu, this implementation gets +to be both usable *and* secure. On a 2 ghz cpu, this implementation gets roughly 0.09 rounds/ms under CPython (220x too slow), and 1.9 rounds/ms under PyPy (10x too slow). diff --git a/passlib/utils/des.py b/passlib/utils/des.py index def894d..65dfe8a 100644 --- a/passlib/utils/des.py +++ b/passlib/utils/des.py @@ -666,7 +666,7 @@ def des_encrypt_block(key, input, salt=0, rounds=1): :arg salt: Optional 24-bit integer used to mutate the base DES algorithm in a - manner specific to :class:`~passlib.hash.des_crypt` and it's variants. + manner specific to :class:`~passlib.hash.des_crypt` and its variants. The default value ``0`` provides the normal (unsalted) DES behavior. The salt functions as follows: if the ``i``'th bit of ``salt`` is set, @@ -675,7 +675,7 @@ def des_encrypt_block(key, input, salt=0, rounds=1): :arg rounds: Optional number of rounds of to apply the DES key schedule. the default (``rounds=1``) provides the normal DES behavior, - but :class:`~passlib.hash.des_crypt` and it's variants use + but :class:`~passlib.hash.des_crypt` and its variants use alternate rounds values. :raises TypeError: if any of the provided args are of the wrong type. diff --git a/passlib/utils/handlers.py b/passlib/utils/handlers.py index 4d03b3b..c3a8f94 100644 --- a/passlib/utils/handlers.py +++ b/passlib/utils/handlers.py @@ -606,7 +606,7 @@ class GenericHandler(PasswordHash): (with the extra keyword *checksum*). this method may not work correctly for all hashes, - and may not be available on some few. it's interface may + and may not be available on some few. its interface may change in future releases, if it's kept around at all. :arg hash: hash to parse @@ -920,7 +920,7 @@ class HasSalt(GenericHandler): Class Attributes ================ - In order for :meth:`!_norm_salt` to do it's job, the following + In order for :meth:`!_norm_salt` to do its job, the following attributes should be provided by the handler subclass: .. attribute:: min_salt_size @@ -1082,7 +1082,7 @@ class HasSalt(GenericHandler): @staticmethod def _truncate_salt(salt, mx): # NOTE: some hashes (e.g. bcrypt) has structure within their - # salt string. this provides a method to overide to perform + # salt string. this provides a method to override to perform # the truncation properly return salt[:mx] @@ -1143,7 +1143,7 @@ class HasRounds(GenericHandler): Class Attributes ================ - In order for :meth:`!_norm_rounds` to do it's job, the following + In order for :meth:`!_norm_rounds` to do its job, the following attributes must be provided by the handler subclass: .. attribute:: min_rounds diff --git a/passlib/utils/md4.py b/passlib/utils/md4.py index cdc1493..0f739e1 100644 --- a/passlib/utils/md4.py +++ b/passlib/utils/md4.py @@ -56,7 +56,7 @@ class md4(object): .. method:: hexdigest - return hexdecimal version of digest + return hexadecimal version of digest """ # FIXME: make this follow hash object PEP better. # FIXME: this isn't threadsafe diff --git a/passlib/utils/pbkdf2.py b/passlib/utils/pbkdf2.py index 1cd0d8f..03a19a9 100644 --- a/passlib/utils/pbkdf2.py +++ b/passlib/utils/pbkdf2.py @@ -150,7 +150,7 @@ def _get_hmac_prf(digest): digest) if _EVP and digest == "sha1": - # use m2crypto function directly for sha1, since that's it's default digest + # use m2crypto function directly for sha1, since that's its default digest try: result = _EVP.hmac(b('x'),b('y')) except ValueError: # pragma: no cover diff --git a/passlib/win32.py b/passlib/win32.py index 7815597..783cc9e 100644 --- a/passlib/win32.py +++ b/passlib/win32.py @@ -53,7 +53,7 @@ raw_nthash = nthash.raw_nthash def raw_lmhash(secret, encoding="ascii", hex=False): "encode password using des-based LMHASH algorithm; returns string of raw bytes, or unicode hex" # NOTE: various references say LMHASH uses the OEM codepage of the host - # for it's encoding. until a clear reference is found, + # for its encoding. until a clear reference is found, # as well as a path for getting the encoding, # letting this default to "ascii" to prevent incorrect hashes # from being made w/o user explicitly choosing an encoding. |
