md5 and sha module will be deprecated in python 2.6 #266
This commit is contained in:
parent
5fc5b08599
commit
d22e690822
@ -22,7 +22,7 @@ UNSTABLE. We have been adding helpers randomly to this module.
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import sha
|
import hashlib
|
||||||
import random
|
import random
|
||||||
import binascii
|
import binascii
|
||||||
import gettext
|
import gettext
|
||||||
@ -42,7 +42,7 @@ def printable_hash(in_hash):
|
|||||||
|
|
||||||
def sha_data(data):
|
def sha_data(data):
|
||||||
"""sha1 hash some bytes."""
|
"""sha1 hash some bytes."""
|
||||||
sha_hash = sha.new()
|
sha_hash = hashlib.sha1()
|
||||||
sha_hash.update(data)
|
sha_hash.update(data)
|
||||||
return sha_hash.digest()
|
return sha_hash.digest()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user