
"Compatibility module for python 2.4 - 2.6"

try:
    import hashlib
    sha1 = hashlib.sha1
    md5 = hashlib.md5
    sha256 = hashlib.sha256
except ImportError:
    import sha
    import md5
    from Crypto.Hash import SHA256
    sha1 = sha.new
    md5 = md5.new
    sha256 = SHA256.new


"Compatibility module for python 2.4 - 2.6"

try:
    import hashlib
    sha1 = hashlib.sha1
    md5 = hashlib.md5
except ImportError:
    import sha
    import md5
    sha1 = sha.new
    md5 = md5.new
from Crypto.Hash import SHA256
sha256 = SHA256.new

Use sha256 algorithm from pycrypto.
Use sha256 algorithm from pycrypto.

  
  "Compatibility module for python 2.4 - 2.6"
  
  try:
      import hashlib
      sha1 = hashlib.sha1
      md5 = hashlib.md5
-     sha256 = hashlib.sha256
  except ImportError:
      import sha
      import md5
-     from Crypto.Hash import SHA256
      sha1 = sha.new
      md5 = md5.new
+ from Crypto.Hash import SHA256
-     sha256 = SHA256.new
+ sha256 = SHA256.new
  
Use sha256 algorithm from pycrypto.
## Code Before:

"Compatibility module for python 2.4 - 2.6"

try:
    import hashlib
    sha1 = hashlib.sha1
    md5 = hashlib.md5
    sha256 = hashlib.sha256
except ImportError:
    import sha
    import md5
    from Crypto.Hash import SHA256
    sha1 = sha.new
    md5 = md5.new
    sha256 = SHA256.new

## Instruction:
Use sha256 algorithm from pycrypto.
## Code After:

"Compatibility module for python 2.4 - 2.6"

try:
    import hashlib
    sha1 = hashlib.sha1
    md5 = hashlib.md5
except ImportError:
    import sha
    import md5
    sha1 = sha.new
    md5 = md5.new
from Crypto.Hash import SHA256
sha256 = SHA256.new
