Skip to content

Commit

Permalink
Fix issues with documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amol- committed Apr 22, 2015
1 parent 2ede8ba commit 5c407db
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Release 1.7.0dev (2015-02-25)
* Fixed Test suite on Python 3.3 #53, #51

Release 1.6.5 (2015-02-06)
=========================
==========================

* @cached decorator now keeps docstring of decorated method.
* Fix crash when Session ``accessed_time`` is not available, this happened
Expand Down Expand Up @@ -353,7 +353,7 @@ Release 1.0 (8/13/2008)
* Added cookie delete to both cookie only sessions and normal sessions, to
help with proxies and such that may determine whether a user is logged in
via a cookie. (cookie varies, etc.). Suggested by Felix Schwarz.
* cache.get_value() now uses the given **kwargs in all cases in the same
* cache.get_value() now uses the given **kwargs** in all cases in the same
manner as cache.set_value(). This way you can send a new createfunc
to cache.get_value() each time and it will be used.

Expand Down Expand Up @@ -512,7 +512,7 @@ Release 0.7 (05/18/07)
* Cleanup of container/cache/container_test
* Namespaces no longer require a context, removed NamespaceContext?
* Logging in container.py uses logging module
* Cleanup of argument passing, use name **kwargs instead of **params for
* Cleanup of argument passing, use name **kwargs** instead of **params** for
generic kwargs
* Container classes contain a static create_namespace() method, namespaces are
accessed from the ContainerContext? via string name + container class alone
Expand Down
15 changes: 8 additions & 7 deletions beaker/crypto/pbkdf2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ def _long_to_bin(x, hex_format_string):
if hasattr(hashlib, "pbkdf2_hmac"):
def pbkdf2(password, salt, iterations, dklen=0, digest=None):
"""
Implements PBKDF2 with the same API as Django's existing
implementation, using the stdlib.
Implements PBKDF2 using the stdlib. This is used in Python 2.7.8+ and 3.4+.
This is used in Python 2.7.8+ and 3.4+.
HMAC+SHA256 is used as the default pseudo random function.
As of 2014, 100,000 iterations was the recommended default which took
100ms on a 2.7Ghz Intel i7 with an optimized implementation. This is
probably the bare minimum for security given 1000 iterations was
recommended in 2001.
"""
if digest is None:
digest = hashlib.sha1
Expand All @@ -46,10 +50,7 @@ def pbkdf2(password, salt, iterations, dklen=0, digest=None):
100ms on a 2.7Ghz Intel i7 with an optimized implementation. This is
probably the bare minimum for security given 1000 iterations was
recommended in 2001. This code is very well optimized for CPython and
is about five times slower than OpenSSL's implementation. Look in
django.contrib.auth.hashers for the present default, it is lower than
the recommended 100,000 because of the performance difference between
this and an optimized implementation.
is about five times slower than OpenSSL's implementation.
"""
assert iterations > 0
if not digest:
Expand Down
1 change: 0 additions & 1 deletion beaker/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ Module Listing
modules/sqla
modules/pbkdf2


4 changes: 1 addition & 3 deletions beaker/docs/modules/pbkdf2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
Module Contents
---------------

.. autofunction:: crypt
.. autoclass:: PBKDF2
:members: close, hexread, read
.. autofunction:: pbkdf2

0 comments on commit 5c407db

Please sign in to comment.