mcrypt_decrypt
(PHP 4 >= 4.0.2, PHP 5)
mcrypt_decrypt — Decrypts crypttext with given parameters
설명
string mcrypt_decrypt
( string $cipher
, string $key
, string $data
, string $mode
[, string $iv
] )
인수
-
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를 반환합니다.