Add salt param to hash().
This commit is contained in:
parent
bf80d4bf73
commit
0ebc9e1d0b
1 changed files with 1 additions and 1 deletions
|
|
@ -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: "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue