(PHP 4 >= 4.0.2, PHP 5, PHP 7)
mcrypt_decrypt — Decrypts crypttext with given parameters
$cipher
, string $key
, string $data
, string $mode
[, string $iv
] )
Decrypts the data
and returns the unencrypted data.
cipher
MCRYPT_ciphername
상수 중 하나이거나, 알고리즘 이름 문자열.
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
MCRYPT_MODE_modename
상수 중 하나이거나, 다음 문자열 중 하나: "ecb", "cbc", "cfb", "ofb", "nofb" or "stream".
iv
CBC, CFB, OFB 모드와 STREAM 모드의 일부 알고리즘에서 사용합니다.
제공한 IV 크기가 체이닝 모드에서 지원하지 않거나, IV가 필수인 체이닝 모드에
IV를 제공하지 않으면, 함수에서 경고를 보내고
FALSE
를 반환합니다.
Returns the decrypted data as a string 실패 시 FALSE
를 반환합니다.
버전 | 설명 |
---|---|
5.6.0 |
Invalid key and iv sizes
are no longer accepted. mcrypt_decrypt() will now throw
a warning and return FALSE if the inputs are invalid. Previously keys and
IVs were padded with '\0' bytes to the next valid size.
|