(PHP 5 >= 5.3.0, PHP 7)
openssl_decrypt — データを復号
$data
, string $method
, string $key
[, int $options = 0
[, string $iv = ""
[, string $tag = ""
[, string $aad = ""
]]]] ) : string未加工の、または base64 エンコードされた文字列を受け入れて、 与えられたメソッドとキーを使って文字列を復号します。
この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。
dataデータ
method暗号メソッド
keyキー
options
OPENSSL_RAW_DATA あるいは
OPENSSL_ZERO_PADDING のいずれか。
ivNULL ではない初期化ベクター。
tag
The authentication tag in AEAD cipher mode. If it is incorrect, the authentication fails and the function returns FALSE.
aadAdditional authentication data.
成功した場合復号された文字列、失敗した場合に FALSE を返します。
method パラメータを通じて未知の暗号アルゴリズムが渡された場合、
E_WARNING レベルのエラーを発生します。
iv パラメータを通じて空値が渡された場合、
E_WARNING レベルのエラーを発生します。
| バージョン | 説明 |
|---|---|
| 5.3.3 |
iv パラメータが追加されました。
|
| 5.4.0 |
raw_output パラメータが options に変わりました。
|
| 7.1.0 | tag および aad パラメータが追加されました。 |