mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-22 18:50:14 +00:00
fix salt for password
This commit is contained in:
parent
05dbba4da6
commit
a18793d8d6
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ class MPW
|
||||||
# args: id -> the item id
|
# args: id -> the item id
|
||||||
# password -> the new password
|
# password -> the new password
|
||||||
def set_password(id, password)
|
def set_password(id, password)
|
||||||
salt = MPW::password(Random.rand(4..9))
|
salt = MPW::password(length: Random.rand(4..9))
|
||||||
password = "$#{salt}::#{password}"
|
password = "$#{salt}::#{password}"
|
||||||
|
|
||||||
@passwords[id] = encrypt(password)
|
@passwords[id] = encrypt(password)
|
||||||
|
|
Loading…
Add table
Reference in a new issue