mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
add ZipArchive::setEncryptionIndex and ZipArchive::setEncryptionName (from 1.14.0)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342241 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
279c3722ec
commit
a0f65747b0
3 changed files with 188 additions and 0 deletions
|
@ -35,6 +35,8 @@
|
|||
<function name="ZipArchive::setCommentName" from="PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.4.0"/>
|
||||
<function name="ZipArchive::setCompressionIndex" from="PHP 7, PECL zip >= 1.13.0"/>
|
||||
<function name="ZipArchive::setCompressionName" from="PHP 7, PECL zip >= 1.13.0"/>
|
||||
<function name="ZipArchive::setEncryptionIndex" from="PHP >= 7.2, PECL zip >= 1.14.0"/>
|
||||
<function name="ZipArchive::setEncryptionName" from="PHP >= 7.2, PECL zip >= 1.14.0"/>
|
||||
<function name="ZipArchive::setExternalAttributesIndex" from="PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4"/>
|
||||
<function name="ZipArchive::setExternalAttributesName" from="PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4"/>
|
||||
<function name="ZipArchive::setPassword" from="PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4"/>
|
||||
|
|
79
reference/zip/ziparchive/setencryptionindex.xml
Normal file
79
reference/zip/ziparchive/setencryptionindex.xml
Normal file
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 332989 $ -->
|
||||
<refentry xml:id="ziparchive.setencryptionindex" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>ZipArchive::setEncryptionIndex</refname>
|
||||
<refpurpose>Set the encryption method of an entry defined by its index</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type>
|
||||
<methodname>ZipArchive::setEncryptionIndex</methodname>
|
||||
<methodparam><type>int</type><parameter>index</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>method</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>password</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Set the encryption method of an entry defined by its index.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>index</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Index of the entry.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>method</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The encryption method defined by one of the ZipArchive::EM_ constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>password</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optional password, default used when missing.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
107
reference/zip/ziparchive/setencryptionname.xml
Normal file
107
reference/zip/ziparchive/setencryptionname.xml
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 339282 $ -->
|
||||
<refentry xml:id="ziparchive.setencryptionname" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>ZipArchive::setEncryptionName</refname>
|
||||
<refpurpose>Set the encryption method of an entry defined by its name</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>bool</type>
|
||||
<methodname>ZipArchive::setEncryptionName</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam><type>int</type><parameter>method</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>password</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Set the encryption method of an entry defined by its name.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Name of the entry.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>method</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The encryption method defined by one of the ZipArchive::EM_ constants.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>password</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optional password, default used when missing.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
This example creates a ZIP file archive
|
||||
<filename>test.zip</filename> and add
|
||||
the file <filename>test.txt</filename>
|
||||
encrypted using the AES 256 method.
|
||||
</para>
|
||||
<example>
|
||||
<title>Archive and encrypt a file</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open('test.zip', ZipArchive::CREATE) === TRUE) {
|
||||
$zip->setPassword('secret');
|
||||
$zip->addFile('text.txt');
|
||||
$zip->setEncryptionName('text.txt', ZipArchive::EM_AES_256);
|
||||
$zip->close();
|
||||
echo "Ok\n";
|
||||
} else {
|
||||
echo "KO\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
Loading…
Reference in a new issue