In the action.php page, I have a string that I want to store in mysql but I want to encrypt it before inserting it to the db
$data = "Hello World";
$data = Encrypt_This_String($data,"ABCD"); // abcd is a key
// now I insert this string into MySQL database
In the other side, I need to get back this string from my C#.NET application, so I need to do something like this :
string myStr = getMyString(); // where getMyString() is a function that get the encrypted string from db
myStr = Decrypt_String(myStr,"ABCD");
I need that myStr hold the value "Hello World"
Could someone please give me an encryption algorithm that is based on a key and can be used in both PHP and C# ?