Search
j0ke.net Open Build Service
>
Projects
>
devel
:
python
>
python-beaker
> python-beaker-py2.4-hashlib.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File python-beaker-py2.4-hashlib.patch of Package python-beaker
--- beaker/session.py.orig 2009-06-02 08:58:51.000000000 -0400 +++ beaker/session.py 2009-06-02 09:00:26.000000000 -0400 @@ -5,13 +5,8 @@ import random import time from datetime import datetime, timedelta -try: - from hashlib import md5, sha1 -except ImportError: - from md5 import md5 - # NOTE: We have to use the callable with hashlib (hashlib.sha1), - # otherwise hmac only accepts the sha module object itself - import sha as sha1 +from md5 import md5 +import sha as sha1 # Check for pycryptopp encryption for AES try: --- beaker/util.py.orig 2009-06-02 09:22:13.000000000 -0400 +++ beaker/util.py 2009-06-02 09:22:44.000000000 -0400 @@ -17,10 +17,7 @@ Set = set except NameError: from sets import Set -try: - from hashlib import sha1 -except ImportError: - from sha import sha as sha1 +from sha import sha as sha1 from beaker.converters import asbool --- beaker/crypto/pbkdf2.py.orig 2009-06-02 09:22:07.000000000 -0400 +++ beaker/crypto/pbkdf2.py 2009-06-02 09:22:34.000000000 -0400 @@ -79,12 +79,7 @@ except ImportError: # PyCrypto not available. Use the Python standard library. import hmac as HMAC - try: - from hashlib import sha1 as SHA1 - except ImportError: - # NOTE: We have to use the callable with hashlib (hashlib.sha1), - # otherwise hmac only accepts the sha module object itself - import sha as SHA1 + import sha as SHA1 def strxor(a, b): return "".join([chr(ord(x) ^ ord(y)) for (x, y) in zip(a, b)])