Alrighty then. If I were to use the following commands they work just fine:
AES_Encrypt (PHP):
$un = david;
$pw = pass;
mysql_query(INSERT into tablename (un,pw) values ('$un',aes_encrypt('$pw','key'))",$db);
AES_Encrypt (Command Prompt):
SELECT un, aes_decrypt(pw,'key') from tablename where id=1;
However. I'm trying to write a login page based upon the encrypted data via PHP (send the data via a form and process it). I had it working perfectly - but as soon as encryption is entered things don't go my way. Here's a sample of my efforts which aren't looking too good (I am extracting from a form, but for simplicity I'm using static data).
<?php
$un = david;
$pw = pass;
$result = mysql_query("SELECT un, aes_decrypt(pw,'key') FROM table_login where un='$un' and pw='$pw' ",$db);
$array_r = mysql_fetch_array($result);
echo "User". $array_r["un"] ."<br />";
echo "Pass". $array_r["pw"];
?>
I searched google and other sites with no luck, but from what I'm told - the aes_decrypt function has to remain in the SELECT clause because it's a MySQL function and not a PHP function.
Not only its still 3 Euros listed for me but it doesn't seem to even support newer versions of Android, it just tells me it's incompatible with my device. EP2 works.
I have seen what it takes to uninstall co-pilot, it is not elegant and certainly not a straight forward Uninstall. Can't they just do what Apple have done, and just have a setting to turn it off?
i don't get all this pushing/forcing to get people to use Ai or get people to have accounts and that sort of thing. If people want to use the services, then they will, they don't need pushing.
They push/force, then they get people like me who looks on it with suspicion and find anyway to disable or not use the service
So what happens when all These AI services have grabbed all the data from humans and have to then start grabbing data a from other AIs?
So we will get more false info made up by machines, I feel sorry for the younger generation, they will not know what is real and what is not.
It can be done, I have done it in the past, but Windows goes wild getting new drivers and moving stuff around. I think it is better these days, but as other have said, always better to do a fresh installation.
Question
DjmUK
Alrighty then. If I were to use the following commands they work just fine:
AES_Encrypt (PHP):
$un = david;
$pw = pass;
mysql_query(INSERT into tablename (un,pw) values ('$un',aes_encrypt('$pw','key'))",$db);
AES_Encrypt (Command Prompt):
SELECT un, aes_decrypt(pw,'key') from tablename where id=1;
However. I'm trying to write a login page based upon the encrypted data via PHP (send the data via a form and process it). I had it working perfectly - but as soon as encryption is entered things don't go my way. Here's a sample of my efforts which aren't looking too good (I am extracting from a form, but for simplicity I'm using static data).
I searched google and other sites with no luck, but from what I'm told - the aes_decrypt function has to remain in the SELECT clause because it's a MySQL function and not a PHP function.
Please help me and thanks in advance.
Link to comment
https://www.neowin.net/forum/topic/290091-php-mysql-aes_encrypt-aes_decrypt/Share on other sites
11 answers to this question
Recommended Posts