php8.5
Home/ Manual/ mcrypt / functions/ mcrypt_decrypt

mcrypt_decrypt

PHP function Edit on GitHub ✎

(PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)

Decrypts crypttext with given parameters

Removed-7-2-0

Description

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

Decrypts the data and returns the unencrypted data.

Parameters

cipher

Cipher

key

The key with which the data was encrypted. If the provided key size is not supported by the cipher, the function will emit a warning and return false

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

Mode

iv

Strict

Return Values

Returns the decrypted data as a string Falseforfailure.

See Also

Source: reference/mcrypt/functions/mcrypt-decrypt.xml · from the official PHP manual (php/doc-en)