Req #66925 [Opn]: encrypt feature
| From: | yvs dot ppt at hotmail dot fr | Date: | Tue, 18 Mar 2014 16:20:18 +0000 |
| Subject: | Req #66925 [Opn]: encrypt feature | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184822@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66925&edit=1
ID: 66925
User updated by: yvs dot ppt at hotmail dot fr
Reported by: yvs dot ppt at hotmail dot fr
Summary: encrypt feature
Status: Open
Type: Feature/Change Request
Package: Zip Related
Operating System: Windows
PHP Version: 5.4.26
Block user comment: N
Private report: N
New Comment:
Sorry, there are no method called create for class ZipArchive.
Creation of zip is done with method open :
$zip->open($zipname, ZipArchive::CREATE);
Previous Comments:
------------------------------------------------------------------------
[2014-03-18 16:15:34] yvs dot ppt at hotmail dot fr
Description:
------------
As "winzip" or "7zip", is-it possible to add encrypt functionnality to
ZipArchive ?
may be with:
$zip = new ZipArchive;
$zip->create($zipname, ZipArchive::CREATE);
$zip->setEncryptPassword($secretPhrase); // NEW FEATURE
$zip->addFile($realpath, $localname);
$zip->close();
or:
$zip = new ZipArchive;
$zip->create($zipname, ZipArchive::CREATE, $encryptPassword);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66925&edit=1