Re: encrypted password

2003-02-16 Thread Curtis Maurand
However, I currently have a need to extract and decode that data. I need a two way function. Curtis On Sun, 16 Feb 2003, Michael T. Babcock wrote: > Curtis Maurand wrote: > > >need to encrypt data and then retrieve it later (credit card data). I could > >probably pass it through and md5 or

Re: encrypted password

2003-02-16 Thread Curtis Maurand
Point well taken. I will do remotes that way. Curtis On Sun, 16 Feb 2003, Michael T. Babcock wrote: > Curtis Maurand wrote: > > >need to encrypt data and then retrieve it later (credit card data). I could > >probably pass it through and md5 or des function via openssl I suppose and > >then

Re: encrypted password

2003-02-16 Thread Michael T. Babcock
Curtis Maurand wrote: need to encrypt data and then retrieve it later (credit card data). I could probably pass it through and md5 or des function via openssl I suppose and then store it. Perl and PHP both have functions to handle that. Just to be a security nut, you shouldn't use the encry

Re: encrypted password

2003-02-14 Thread Curtis Maurand
I came to the same conclusion today after reading the docs again. I would prefer the des_encode if I need to get things back out of it, but since I'm running 3.23.55, the des_encode function is not available to me. I have a need to encrypt data and then retrieve it later (credit card data). I

Re: encrypted password

2003-02-13 Thread Tonu Samuel
On Tue, 2003-02-11 at 15:39, Curtis Maurand wrote: > > The manual suggests that the password function is really for intenal mysql > functions. Ideally you should use the encode or md5_encode functions. > > update user set password=encode('password', 'salt') where user = > 'your_user'; > Unle

Re: encrypted password

2003-02-11 Thread Sergei Golubchik
Hi! On Feb 04, Jianping Zhu wrote: > > I have mysql in a redhat machine. I need to use mysql do user > authentication to a website. > I have a table like following. > > +--+--+ > | username | passwd | > +--+--+ > | jianping | jian1830 | > | chichi | jian1830 |

Re: encrypted password

2003-02-11 Thread Curtis Maurand
The manual suggests that the password function is really for intenal mysql functions. Ideally you should use the encode or md5_encode functions. update user set password=encode('password', 'salt') where user = 'your_user'; Curtis On Wed, 5 Feb 2003, Natale Babbo wrote: > try to use the pas

Re: encrypted password

2003-02-09 Thread William R. Mussatto
> On Wed, 2003-02-05 at 13:53, Kamara Eric R-M wrote: > >> INSERT into tbl_name (username,password) values >> ('user',PASSWORD('passwd')); >> >> and when authenticating the user you can do something like >> >> SELECT username from tbl_name where passwd=PASSWORD('$pass'); and in >> this case $pass i

Re: encrypted password

2003-02-07 Thread William R. Mussatto
When you store the information into the field you can us the mysql function password. Then when you wish to test for a match you do something like select count(*) where username='$username' and passwd = Password($password) Where $username is the input username and $password is the input usernam

Re: encrypted password

2003-02-07 Thread Veysel Harun Sahin
Try this: insert into tablename values ('myusername', password('mypassword')); [EMAIL PROTECTED] wrote: On Tue, Feb 04, 2003 at 02:58:28PM -0500, Jianping Zhu wrote: I have mysql in a redhat machine. I need to use mysql do user authentication to a website. I have a table like following.

Re: encrypted password

2003-02-07 Thread Tonu Samuel
On Wed, 2003-02-05 at 13:53, Kamara Eric R-M wrote: > INSERT into tbl_name (username,password) values > ('user',PASSWORD('passwd')); > > and when authenticating the user you can do something like > > SELECT username from tbl_name where passwd=PASSWORD('$pass'); and in this > case $pass is the va

Re: encrypted password

2003-02-06 Thread Johannes Ullrich
the easiest way to do this is to use mysql's own 'password' function. to add a new user use: insert into table (username,passwd) values ('jianping',password('jian1830')) to validate the password: select count(*) from table where username='jianping' and passwd=password('whatwasentered'); or

Re: encrypted password

2003-02-06 Thread Jerry M. Howell II
On Tue, Feb 04, 2003 at 02:58:28PM -0500, Jianping Zhu wrote: > > I have mysql in a redhat machine. I need to use mysql do user > authentication to a website. > I have a table like following. > > +--+--+ > | username | passwd | > +--+--+ > | jianping | jian1830 |

Re: encrypted password

2003-02-05 Thread Kamara Eric R-M
On Tue, 4 Feb 2003, Jianping Zhu wrote: > > I have mysql in a redhat machine. I need to use mysql do user > authentication to a website. > I have a table like following. > > +--+--+ > | username | passwd | > +--+--+ > | jianping | jian1830 | > | chichi | jian18

Re: encrypted password

2003-02-05 Thread Diana Soares
Hi, Use the PASSWORD() function to encrypt the password. There are other encryptation functions in MySQL like MD5(), SHA1(), ENCRYPT(). Have a look at functions you can use in SELECT statement at the manual. http://www.mysql.com/doc/en/Miscellaneous_functions.html On Tue, 2003-02-04 at 19:58, Jian

Re: encrypted password

2003-02-05 Thread Kevin Smith
Hi, Simply do the following: INSERT INTO yourtable (username, password) VALUES ('chichi', PASSWORD('jian1830')); The encrypted password will look like this... 2748c558120ee3c9. This is MySQL's own internal encrypting function. Remember to set the password to a, CHAR(16) binary not null, field.

Re: encrypted password

2003-02-05 Thread Bruce MacDonald
- Original Message - From: "Jianping Zhu" <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 1:58 PM > I want the passwd field not to be plain text but encrypted. how can i do > that? Use the password function: mysql> create table users ( -> name varchar(12), -> pass varchar(1

Re: encrypted password

2003-02-05 Thread Natale Babbo
try to use the password() function. update user set password=password('your_psw') where user='your_user' bye --- Jianping Zhu <[EMAIL PROTECTED]> ha scritto: > > I have mysql in a redhat machine. I need to use > mysql do user > authentication to a website. > I have a table like following. >