RE: [PHP] Adding encryption to passwords




You can try the MySQL built in functions. Ie encode(str, key)

insert into test (password) values (encode("mypass","some key"));

You can then use the decode() functions in your matching queries.
You also need to consider security of your php code, as the key to decode
will be in the query strings.

There are other built-in encryptions functions in MySQL you can explore.

-----Original Message-----
From: Thodoris [mailto:tgol@xxxxxxxxxx]
Sent: 19 September 2008 10:25 AM
To: PHP General list
Subject: [PHP] Adding encryption to passwords

Hi guys I have developed an intranet web interface with user access.
I am storing the passwords into a mysql table as raw text (I know not so
secure). So I am adding group access features and I am thinking to
encrypt the passwords because this seems to grow as a project although
it started as a simple web tool.

So what do you think is the best way to use crypt, mcrypt, hash or
perhaps md5 and what are really the differences because I am not sure if
I get it right.

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

.



Relevant Pages

  • Re: Rails & MySQL login problem (#42000Access denied for user)
    ... being used (they would be much longer, 41 bytes, if they are new passwords). ... log on using the new authentication method that MySQL 4.1+ uses. ... I installed the gem with the command given above, ...
    (comp.lang.ruby)
  • [UNIX] Inter7 VPopmail DB Password Problem
    ... VPopmail contains the SQL password in one of its binaries. ... VPopmail version 4.10.35 and prior (When using MySQL) ... they all contain the passwords as well. ...
    (Securiteam)
  • Re: [OT] Mysql advice
    ... The passwords are the same. ... The zenoss install will ask you for the mysql root password at which time you give it and all is well with the world. ... antivirus y antispam ¡gratis! ...
    (Fedora)
  • Re: Synchronize Active Directory with MySQL
    ... Then it would make sense to me to put all of the passwords from MySQL into ... >>> systems runs on an active directory and the other on a mysql database. ... >>> Lukas ...
    (microsoft.public.windows.server.active_directory)
  • MySQL -> PHP Encoding / Decoding problem
    ... Java to simulate the behavior of small networks ... How can I decode the UTF8 latin data to render correctly in PHP? ... Better still -- how can I fix the data in MySQL ...
    (comp.lang.php)