I'm here to explain my website and show the "bug" or "error" that appears to my web.
Some days ago I did a page, the topic is encrypt and decrypt with AES.
Here is a screenshot:
but when I crypt or decrypt something very very LONG.. look that:
As you can see, the text goes on and on .. the idea I have is that when I press Encrypt / Decrypt, create a label and on that label, print the result. If it is in a label or a textarea, the text would not follow to the right, it would go down.
Here is the php code when you click on "Encrypt" / "Decrypt":
<?php
if ($_POST['direction2'])
{
include 'AES.php';
$imputText = $_POST['imputText'];
$imputKey = $_POST['imputKey'];
$blockSize = $_POST['blockSize'];
$aes = new AES($imputText, $imputKey, $blockSize);
$enc = $aes->encrypt();
$aes->setData($enc);
$dec=$aes->decrypt();
echo "Encriptado: ".$enc."<br/>";
echo "Original: ".$dec."<br/>";
}
else if($_POST['direction1'])
{
include 'AES.php';
$imputText = $_POST['imputText'];
$imputKey = $_POST['imputKey'];
$blockSize = $_POST['blockSize'];
$aes = new AES($imputText, $imputKey, $blockSize);
$enc = $aes->encrypt();
$aes->setData($enc);
$dec=$aes->decrypt();
echo "Original: ".$dec."<br/>";
$enc = $aes->decrypt();
$aes->setData($enc);
$dec=$aes->decrypt();
echo "Desencriptado: ".$dec."<br/>";
}
?>
As you can see, I print the result with an "echo".
Thanks to everyone! Hope u can help me.