Add salt param to hash().

This commit is contained in:
Dominik Picheta 2014-12-07 18:35:37 +00:00
commit 0ebc9e1d0b

View file

@ -228,7 +228,7 @@ proc makePassword(password, salt: string): string =
when defined(windows):
result = getMD5(salt & getMD5(password))
else:
result = hash(getMD5(salt & getMD5(password)))
result = hash(getMD5(salt & getMD5(password)), genSalt(8))
# -----------------------------------------------------------------------------
template `||`(x: expr): expr = (if not isNil(x): x else: "")