<?php
require_once('blowfish.php');
switch ($_POST['action']){
case 'decript':
$output = PMA_blowfish_decrypt($_REQUEST['text'],$_REQUEST['key']);
break;
case 'crypt':
$output = PMA_blowfish_encrypt($_REQUEST['text'],$_REQUEST['key']);
break;
}
$output = blowfish_encrypt('come stai','166ac015a7c6aaaa');
?>
<h2>Decrypt</h2>
<form action="" method="post">
Key: <input type="text" name="key" value="166ac015a7c6aaaa"><br />
Textarea: <br />
<textarea name="text" cols="55" rows="15"></textarea><br />
<input type="hidden" value="decript" name="action" /><br />
<input type="submit" value="submit" />
</form>
<h2>Crypt</h2>
<form action="" method="post">
Key: <input type="text" name="key" value="166ac015a7c6aaaa"><br />
Textarea: <br />
<textarea name="text" cols="55" rows="15"></textarea><br />
<input type="hidden" value="crypt" name="action" /><br />
<input type="submit" value="submit" />
</form>
<textarea cols="40" rows="25"><?= $output ?></textarea>