ZipArchive::setEncryptionIndex

(PHP >= 7.2.0, PHP 8, PECL zip >= 1.14.0)

ZipArchive::setEncryptionIndexindex で定義されたエントリの暗号化方法を指定する

説明

public ZipArchive::setEncryptionIndex(int $index, int $method, ?string $password = null): bool

index で定義されたエントリの暗号化方法を設定します。

パラメータ

index

エントリのインデックスです

method

ZipArchive::EM_ 定数のうちのひとつによって定義された暗号化方式

password

オプションで指定するパスワード。 指定されない場合はデフォルトの値が使われます。

戻り値

成功した場合に true を、失敗した場合に false を返します。

変更履歴

バージョン 説明
8.0.0 password は、nullable になりました。

注意

注意:

この関数は、libzip ≥ 1.2.0 でビルドされた場合にのみ利用可能です。

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top