Re: field with Password
От | Iñigo Barandiaran |
---|---|
Тема | Re: field with Password |
Дата | |
Msg-id | 4989ABBA.7000307@vicomtech.org обсуждение исходный текст |
Ответ на | Re: field with Password (Iñigo Barandiaran <ibarandiaran@vicomtech.org>) |
Список | pgsql-general |
Thanks Raymond !!!!<br /><blockquote cite="mid:4989A827.5060104@vicomtech.org" type="cite"><br /> That is something I wanted!It's Great if it is already integrated in Postgre! Superb. This is much more easy.<br /><br /> Thank you All.<br /><br/> Best,<br /><blockquote cite="mid:4989A790.7090401@gmail.com" type="cite"> Iñigo Barandiaran wrote: <blockquote cite="mid:49897455.7080602@vicomtech.org"type="cite"><br /><br /></blockquote> Well, you can use the built-in md5 functionfor this purpose. For instance, you could insert a password into the table with a statement like:<br /><br /><blockquote>insertinto auth_data (user_id, password) values (1, md5('test'));<br /></blockquote><br /> And compare thesupplied password with something like:<br /><br /><blockquote>select true from auth_data where user_id = 1 and password= md5('test');<br /></blockquote><br /> You don't need to depend on an external library for this functionality; it'sbuilt right into Postgres. Personally, in my own apps I write in PHP, I use a combination of sha1 and md5 to hash userpasswords, without depending on Postgres to do the hashing, but the effect is basically the same.<br /><br /> Raymond<br/></blockquote><br /></blockquote><br />
В списке pgsql-general по дате отправления: