I have created zip with encryption using setEncryptionName, as follows:
if($zip->open($zip_destination_real,\ZipArchive::CREATE) === TRUE)
{
$zip->addFile($filePath_real,'xyz.txt');
$zip->setEncryptionName('xyz.txt', \ZipArchive::EM_AES_256, '12345');
$zip->close();
}
Now, how to extract this zip file? extractTo function is returning false.
$r = $zip->extractTo($dir_real); var_dump($r);
I use php 7.2
Even when I manually extract the folder it asks for password.I enter 12345 as set, but error pops up , saying Error occured while extracting files.