? 8000 :
Hashlib:
import hashlib
import random
password = str(random.getrandbits(8000))
print hashlib.sha512(password).hexdigest()
, :
import hashlib
import random
password = str(random.getrandbits(8000))
salt = str(random.getrandbits(256))
print hashlib.sha512(password + salt).hexdigest()
Bcrypt:
import bcrypt
import random
password = str(random.getrandbits(8000))
print bcrypt.hashpw(password,bcrypt.gensalt())
bcrypt:
$ time ./bcrypt_test.py
$2a$12$Om3a3zKsCNAM/SLB3hq5w.HYukFwn4CJ73rjXYNUPgqckUx2uLEmG
real 0m0.401s
user 0m0.313s
sys 0m0.013s
Timing hashlib:
$ time ./hashlib_test.py
9e37eb4f164bbb1808833297d0244327e4faac109cd92729228f6e36d75d23044ac13a7a1907515cd6db44474b244678779e3ae4e97d8355c2069332aae52d61
real 0m0.032s
user 0m0.021s
sys 0m0.010s
$