1
0
Fork 0
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:
nishiki 2016-07-12 20:32:21 +02:00
parent 05dbba4da6
commit a18793d8d6

View file

@ -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)