EldoS | Feel safer!

Software components for data protection, secure storage and transfer

PHP to encrypt data

Posted: 01/26/2011 04:20:11
by simy ryan (Basic support level)
Joined: 01/26/2011
Posts: 1

I am in trouble now. Just tried lots of different versions of AES_ENCRYPT / AES_DECRYPT scripts but cannot get it working. I've even tried putting the mySQL directly in via the phpAdmin query window where it works fine. I generated the following code from the 'generate php' button on there.

Can anybody tell me what I'm doing wrong, please.

The [url=http://www.phpkode.com/scripts/category/php-cryptography/]PHP Encryption[/url] script is:

@mysql_select_db($database) or die( "databaseConnection=0");

$query = "INSERT INTO encodeit (id,card_number) VALUES (\'8\',AES_ENCRYPT(\'Anthony\',\'xk8\'))";

$successful = mysql_query($query);
echo $query;
echo $successful;

This generates a record in my database, but the 'card_number' field is a blob so I can't view the data in there (unless someone can tell me otherwise???).

Thanks for any help in advance
Posted: 01/26/2011 04:42:53
by Vsevolod Ievgiienko (Team)


Sorry, but this is a support forum for Eldos Corp. products not for general questions and discussions about other products.
Posted: 01/26/2011 04:59:20
by Eugene Mayevski (Team)

You can post your questions on StackOverflow - this is a large community of developers that help each other with programming problems.

Sincerely yours
Eugene Mayevski



Topic viewed 873 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!