Re: Storing/Using Passwords

Поиск
Список
Период
Сортировка
От Pascual De Ruvo
Тема Re: Storing/Using Passwords
Дата
Msg-id fb73c1ee050518060120de28f3@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Storing/Using Passwords  (Sean Davis <sdavis2@mail.nih.gov>)
Список pgsql-novice


On 5/18/05, Sean Davis <sdavis2@mail.nih.gov> wrote:
You can compute an MD5 hash in Java and store that.  Then, when a user
enters a password, just compare the same MD5 hash to the value stored
in the database.


If you use oly the MD5 hash of the username, someone with access to the table could replace an existing password and gain access to the system.

In case you want to add an extra level of security you should make the hash unique to every username in YOUR system, in order to do this, you can concatenate the username, the password, an static text and a dynamic element (can be the OID of the row) , then compute the MD5 hash  and store it in  the users table. Then compute the MD5 hash with the same logic and compare it with the stored value any time you want to authenticate the user.

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Schuhmacher, Bret"
Дата:
Сообщение: Psql bug on Windows or pilot error? ;-)
Следующее
От: John DeSoi
Дата:
Сообщение: Re: Psql bug on Windows or pilot error? ;-)