At 10:59 -0300 5/14/02, Walter D. Funk wrote:
>Hi,
>
>  I am trying Mysql Password() function, to encrypt password in a a
>user/password
>table,
>  it works fine both ways; it is to say, when I submit a login
>(user/password)
>combination it fetches the pair ok.
>  My question is, as I read in the documentation, that the process is
>irreversible, how can I deal with the fact
>  that a user can forget his password, if I will not be able to retrieve the
>  original string, because what i can see is the encrypted data

That is correct.  PASSWORD() (and ENCRYPT()) perform non-reversible
encryption.

>
>  is there a workaround to deal with this, either than storing in a separeted
>  table the original password string (not encrypted), or shall i simply not
>  use this function ?
>
>  thanks in advance to any suggestion
>Walter

You can use ENCODE() and DECODE() to perform reversible encryption.
As of MySQL 4.0.0, if the server is compiled with SSL support, you can
use DES_ENCRYPT() and DES_DECRYPT().

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to