Reply to Re: help encrypting field with MySQL AES_encrypt before Adodb query

Your name:

Reply:


Posted by petersprc on 04/14/07 02:32

Hi,

You could generate the encrypted value:

$_POST['field'] = $db->GetOne(
'select AES_ENCRYPT(?, ?)',
array($_POST['field'], 'password'));


On Apr 13, 10:24 am, "Paul" <l...@invalid.com> wrote:
> I encrypted a database field using MySQL AES_ENCRYPT() from a mysql command
> prompt. But I need to encrypt and decrypt at will in the php code as
> records are added and viewed.
>
> I can easily decrypt it because the code specifies a Query. But the INSERT
> is an ADODB insert:
>
> $_POST['is_here'] = 83;
> ....
> runQuery($db ->GetInsertSQL($rs, $_POST, true));
>
> I need to use MySQL AES_ENCRYPT() one of the $POST fields before it goes
> into this but I don't see how? Mcrypt is not installed on server so MySQL
> functions are what I need to use. Is there a way to have something like :
> $_POST['field'] = "AES_ENCRYPT('text', 'password')";
>
> It is a live system and I am hesitent to make changes without researching
> it.
>
> Any ideas?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация