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:
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user