Prova cosė:
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Testo da criptare: <input type="testo" name="testo"> <br />
Algoritmo: <SELECT NAME="algoritmo">
<OPTION VALUE="md4" NAME="md4">md4</OPTION>
<OPTION VALUE="md5" NAME="md5">md5</OPTION>
<OPTION VALUE="sha1" NAME="sha1">sha1</OPTION>
<OPTION VALUE="sha256" NAME="sha256">sha256</OPTION>
<OPTION VALUE="sha384" NAME="sha384">sha384</OPTION>
<OPTION VALUE="sha512" NAME="sha512">sha512</OPTION>
<OPTION VALUE="ripemd128" NAME="ripemd128">ripemd128</OPTION>
<OPTION VALUE="ripemd160" NAME="ripemd160">ripemd160</OPTION>
<OPTION VALUE="whirlpool" NAME="whirlpool">whirlpool</OPTION>
<OPTION VALUE="snefru" NAME="snefru">snefru</OPTION>
<OPTION VALUE="gost" NAME="gost">gost</OPTION>
<OPTION VALUE="adler32" NAME="adler32">adler32</OPTION>
<OPTION VALUE="crc32" NAME="crc32">crc32</OPTION>
<OPTION VALUE="crc32b" NAME="crc32b">crc32b</OPTION>
</SELECT>
<input type="submit" value="cripta" name ="send">
</form>
<?php
if(isset($_POST['send'])){
$testo = $_POST['testo'];
$algoritmo = $_POST['algoritmo'];
$criptato = hash($algoritmo, $testo);
echo $criptato;
}else{
}
?>