Rory,

I would recommend using MySQL's buit in password() function:

INSERT INTO user ( username,password ) VALUES ( 'someuser', password(
'plaintextpasshere' ) );
SELECT ( username, password ) FROM user WHERE username='someuser' AND
password=password( 'plaintextpass' );

Regards,
Luke Davison

----- Original Message -----
From: "rory oconnor" <[EMAIL PROTECTED]>
To: "perl" <[EMAIL PROTECTED]>
Sent: Monday, April 08, 2002 9:08 PM
Subject: Password Encryption for MySQL field


> I'm writing a small perl script that will help web users manage an
> "account" (i.e. their record in a mysql table).  I want to store their
> password in a field, but I don't want to store it in regular text.  I'm
> not sure if this is a perl or MySQL function, but I think there is some
> method of "encrypting" the password in the field.
>
> Has anyone done that before?  Any help appreciated!
>
> Thanks,
>
> Rory
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to