Req #66925 [Opn]: encrypt feature
| From: | cmb@php.net | Date: | Fri, 17 Jul 2015 10:43:53 +0000 |
| Subject: | Req #66925 [Opn]: encrypt feature | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-194512@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
Updated by: cmb@php.net
Reported by: yvs dot ppt at hotmail dot fr
Summary: encrypt feature
Status: Open
Type: Feature/Change Request
Package: Zip Related
-Operating System: Windows
+Operating System: *
-PHP Version: 5.4.26
+PHP Version: *
Block user comment: N
Private report: N
New Comment:
Actually, this feature wouldn't require a new method, as
ZipArchive::setPassword() could be used, which currently only
works for reading.
Previous Comments:
------------------------------------------------------------------------
[2014-03-18 16:20:17] yvs dot ppt at hotmail dot fr
Sorry, there are no method called create for class ZipArchive.
Creation of zip is done with method open :
$zip->open($zipname, ZipArchive::CREATE);
------------------------------------------------------------------------
[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