(PHP 4 >= 4.0.2, PHP 5)
mcrypt_decrypt — Decrypts crypttext with given parameters
$cipher
, string $key
, string $data
, string $mode
[, string $iv
] )
Decrypts the data and returns the unencrypted data.
cipherUna tra le costanti MCRYPT_ciphername, oppure il nome dell'algoritmo sotto forma di stringa.
keyThe key with which the data was encrypted. If it's smaller than the required keysize, it is padded with '\0'.
data
The data that will be decrypted with the given cipher
and mode. If the size of the data is not n * blocksize,
the data will be padded with '\0'.
modeUna tra le costanti MCRYPT_MODE_modename, oppure una tra le seguenti stringhe: "ecb", "cbc", "cfb", "ofb", "nofb" o "stream".
ivUsato per l'inizializzazione nei modi CBC, CFB, OFB, e in alcuni algoritmi nel modo STREAM. iSe non si fornisce un IV, quando รจ necessario per un algoritmo, la funzione restituisce un avvertimento e utilizza and uses un IV con tutti i byte impostati a "\0".
Returns the decrypted data as a string.