def make_pw_hash(pw, salt=None):
	if not salt:
		salt = bcrypt.gensalt(8) # this should be 10-12 to be extra secure
	pw_hashed = bcrypt.hashpw(pw, salt)
	return '%s|%s' % (pw_hashed, salt)
Beispiel #2
0
def make_pw_hash(pw, salt=None):
    if not salt:
        salt = bcrypt.gensalt(config.ENCRYPTION_HARDNESS_LEVEL)
    pw_hashed = bcrypt.hashpw(pw, salt)
    return '%s|%s' % (pw_hashed, salt)
def make_pw_hash(pw, salt=None):
    if not salt:
        salt = bcrypt.gensalt(config.ENCRYPTION_HARDNESS_LEVEL)
    pw_hashed = bcrypt.hashpw(pw, salt)
    return "%s|%s" % (pw_hashed, salt)
def make_pw_hash(pw, salt=None):
	if not salt:
		salt = bcrypt.gensalt(4) # this should be 10-12
	pw_hashed = bcrypt.hashpw(pw, salt)
	return '%s|%s' % (pw_hashed, salt)