Mcrypt Funktionen
PHP Manual

mcrypt_decrypt

(PHP 4 >= 4.0.2, PHP 5)

mcrypt_decryptDecrypts crypttext with given parameters

Beschreibung

string mcrypt_decrypt ( string $cipher , string $key , string $data , string $mode [, string $iv ] )

Decrypts the data and returns the unencrypted data.

Parameter-Liste

cipher

Eine der Konstanten von MCRYPT_ciphername oder der Name eines Algorithmus als Zeichenkette.

key

The 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'.

mode

Eine der Konstanten von MCRYPT_MODE_modename oder eine der folgenden Zeichenketten: "ecb", "cbc", "cfb", "ofb", "nofb" oder "stream".

iv

Wird für die Initialisierung in den Modi CFC, CFB oder OFB und von einigen Algorithmen im STREAM-Mosud verwendet. Wird kein IV angegeben wenn dieser für einen Algorithmus notwendig ist wird diese Funktion eine Warnung ausgeben und einen IV nehmen bei dem alle Bytes auf "\0" gesetzt sind.

Rückgabewerte

Returns the decrypted data as a string.


Mcrypt Funktionen
PHP Manual