Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: third_party/tlslite/tlslite/utils/cryptomath.py

Issue 2881026: Replaced sha, md5 module imports with hashlib (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tlslite/tlslite/messages.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tlslite/tlslite/utils/cryptomath.py
===================================================================
--- third_party/tlslite/tlslite/utils/cryptomath.py (revision 53598)
+++ third_party/tlslite/tlslite/utils/cryptomath.py (working copy)
@@ -6,8 +6,19 @@
import math
import base64
import binascii
-import sha
+# The sha module is deprecated in Python 2.6
+try:
+ import sha
+except ImportError:
+ from hashlib import sha1 as sha
+
+# The md5 module is deprecated in Python 2.6
+try:
+ import md5
+except ImportError:
+ from hashlib import md5
+
from compat import *
« no previous file with comments | « third_party/tlslite/tlslite/messages.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698