Re: [sqlite] sql statement to update the data in the table

2011-10-20 Thread Joanne Pham
SELECT AES_ENCRYPT(password, 'abcddsfddafdasfddasd'); is work! I think I need to find out what is the data type and data lengh for storing the encrypt password Thanks, JP From: Simon Slavin To: Joanne Pham ;

Re: [sqlite] sql statement to update the data in the table

2011-10-19 Thread Simon Slavin
On 20 Oct 2011, at 1:49am, Joanne Pham wrote: > it seems like it didn't work. > For example the password is 'password'. I ran the update statement below and > do the AES_DECRYPT the password is null instead of 'password'. Try just SELECT AES_ENCRYPT(password, 'abcddsfddafdasfddasd');

Re: [sqlite] sql statement to update the data in the table

2011-10-19 Thread Igor Tandetnik
On 10/19/2011 8:49 PM, Joanne Pham wrote: Yes, That is what i want but it seems like it didn't work. For example the password is 'password'. I ran the update statement below and do the AES_DECRYPT the password is null instead of 'password'. Any idea? You'll have to raise the issue with the

Re: [sqlite] sql statement to update the data in the table

2011-10-19 Thread Joanne Pham
Thanks, Yes, That is what i want but it seems like it didn't work. For example the password is 'password'. I ran the update statement below and do the AES_DECRYPT the password is null instead of 'password'. Any idea? JP From: Igor Tandetnik

Re: [sqlite] sql statement to update the data in the table

2011-10-19 Thread Igor Tandetnik
On 10/19/2011 7:23 PM, Joanne Pham wrote: update vpn set password = AES_ENCRYPT((select password from vpn) , "abcddsfddafdasfddasd"). I suspect you want update vpn set password = AES_ENCRYPT(password, 'abcddsfddafdasfddasd'); -- Igor Tandetnik

Re: [sqlite] sql statement to update the data in the table

2011-10-19 Thread Joanne Pham
Hi Igor,   update vpn set password = AES_ENCRYPT((select password from vpn) , "abcddsfddafdasfddasd"). Basically, I want to encrypt the password in vpn table so the passwords in this table are different. Above mysql statement still didn't work. Any idea. Thanks, JP

Re: [sqlite] sql statement to update the data in the table

2011-10-19 Thread Igor Tandetnik
On 10/19/2011 6:34 PM, Joanne Pham wrote: Curently I had the table with the plain text and I want to encrypt these passwords by using the following sql statement but I got the error mesages.. Any suggestion? update vpn set password = AES_ENCRYPT(select password from mytable,

[sqlite] sql statement to update the data in the table

2011-10-19 Thread Joanne Pham
Hi all, Curently I had the table with the plain text and I want to  encrypt these passwords by using the following sql statement but I got the error mesages. Any suggestion? update vpn set password = AES_ENCRYPT(select password from mytable, "abcddsfddafdasfddasd"). Thanks in advance, JP