How to encrypt and decrypt information?

How to encrypt and decrypt the information and send from location to other like sometime we need to secure our information and submit them through a form by applying encryption and decrypt at receiving end to get the correct information. How can we achieve such a feature while using an API.

We work on multiple type of data and apply manipulation on them but sometime we work on critical information that needs to be highly secure. At that moment cryptography come in picture and apply encryption on data. You can use below line of code and class to get this feature:

include 'AES.php's;

$inputText = "My text to encrypt";

$inputKey = "My text to encrypt";

$blockSize = 256;

$aes = new AES($inputText, $inputKey, $blockSize);

$enc = $aes->encrypt();



echo "After encryption: ".$enc."

echo "After decryption: ".$dec."


Please get the class from below URL:

It is available for multiple platform whether you are using PHP, JAVA etc.