1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-10-20 17:46:31 +02:00

Merge ZipFile and ZipOutputFile, optimization update archive.

This commit is contained in:
wapplay-home-linux
2017-03-10 08:23:57 +03:00
parent cc75f44949
commit f802861d86
31 changed files with 5018 additions and 4525 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace PhpZip\Util;
use PhpZip\Exception\RuntimeException;
use PhpZip\Exception\ZipException;
/**
@@ -14,7 +15,7 @@ class CryptoUtil
*
* @param int $length
* @return string
* @throws ZipException
* @throws RuntimeException
*/
public static final function randomBytes($length)
{
@@ -26,7 +27,7 @@ class CryptoUtil
} elseif (function_exists('mcrypt_create_iv')) {
return mcrypt_create_iv($length);
} else {
throw new ZipException('Extension openssl or mcrypt not loaded');
throw new RuntimeException('Extension openssl or mcrypt not loaded');
}
}
}