password() may uses the whole pass, but it is also incompatible with courier
(read the doc, i think it does some more encoding too)

encrypt() will (almost) never give the same output given the same password.
it is also NOT reversible, instead, something called a "salt" is added to
the string to encrypt (the first 2 characters of the encrypted strings is
the salt). if you encrypt() a string with the same salt, you will get the
same output string

--
Daniel Higgins
Administrateur Syst�me / System Administrator
Netcommunications Inc.
Tel: (450) 346-3401 (st-jean)
      (514) 871-1844 (montr�al)
Fax: (450) 346-3587
http://www.netc.net
----- Original Message -----
From: "Pedro Venda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 7:15 AM
Subject: Re: [courier-users] mysql auth not working - updated


> i got it.
>
> > I think I have read some where you should use the
> > mysql encrypt("YourPasswordGoesHere") function. That
> > is what I use and seems to work...... It could explain
> > your problem.
>
> indeed.
>
> yet, don't you think that password() would be better?
> encrypt() uses only the first 8 chars of the password to produce the
encrypted
> string.
>
> also i would like to have an explanation on how encrypt works... because
> ... well, because of this:
>
> mysql> select encrypt("test");
> +-----------------+
> | encrypt("test") |
> +-----------------+
> | 0cfyC/f6DlrUU   |
> +-----------------+
> 1 row in set (0.01 sec)
>
> mysql> select encrypt("test");
> +-----------------+
> | encrypt("test") |
> +-----------------+
> | 1cyNvNOLyQaUQ   |
> +-----------------+
> 1 row in set (0.00 sec)
>
> mysql> select encrypt("test");
> +-----------------+
> | encrypt("test") |
> +-----------------+
> | 4cr13ju9KqhO.   |
> +-----------------+
> 1 row in set (0.00 sec)
>
> mysql> select encrypt("test");
> +-----------------+
> | encrypt("test") |
> +-----------------+
> | 6c4zBFeN4TFZA   |
> +-----------------+
> 1 row in set (0.00 sec)
>
> mysql>
>
> how can the program authenticate the user with the encrypt function? is
> encrypt() reversible? if it is not, how can we be sure that the stored
> string is an encrypt("test") [for example] since consecutive encrypts
> return different strings?
>
> thanks for the help.
>
>
>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> courier-users mailing list
> [EMAIL PROTECTED]
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
>
>



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to