List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:May 14 2002 2:06pm
Subject:Re: Encrypting with PASSWORD() function
View as plain text  
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().
Thread
Encrypting with PASSWORD() functionWalter D. Funk14 May
  • Re: Encrypting with PASSWORD() functionSherzod B. Ruzmetov14 May
  • Re: Encrypting with PASSWORD() functionLuciano Barcaro14 May
  • Re: Encrypting with PASSWORD() functionPaul DuBois14 May
  • RE: Encrypting with PASSWORD() functionRoger Baklund14 May
  • Re: Encrypting with PASSWORD() functionVictoria Reznichenko14 May
    • RE: Encrypting with PASSWORD() functionadam nelson15 May