mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-20 01:50:04 +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
|
||||
# password -> the new password
|
||||
def set_password(id, password)
|
||||
salt = MPW::password(Random.rand(4..9))
|
||||
salt = MPW::password(length: Random.rand(4..9))
|
||||
password = "$#{salt}::#{password}"
|
||||
|
||||
@passwords[id] = encrypt(password)
|
||||
|
|
Loading…
Add table
Reference in a new issue