| Server IP : 81.19.159.101 / Your IP : 216.73.217.111 Web Server : Apache System : Linux www58.world4you.com 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : ftp8817043 ( 2681) PHP Version : 8.4.21 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/.sites/103/site8817043/web/wp-content/plugins/akeebabackupwp/app/Solo/Helper/ |
Upload File : |
<?php
/**
* @package solo
* @copyright Copyright (c)2014-2025 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace Solo\Helper;
/**
* PHP 8.4+ workaround for standalone MD5 and SHA-1 functions.
*
* PHP 8.4 deprecates the standalone md5(), md5_file(), sha1(), and sha1_file() functions. This trait creates shims
* which use the hash() and hash_file() functions instead where available.
*
* IMPORTANT! PHP 7.4 made the ext/hash extension mandatory. These shims are here only as a backwards compatibility aid.
* Eventually, we need to remove them, replacing their use by the direct use of hash() and hash_file().
*
* @deprecated 9.0
*/
class HashHelper
{
/**
* @deprecated 9.0 Use hash() instead
*/
public static function md5($string, $binary = false)
{
static $shouldUseHash = null;
if ($shouldUseHash === null)
{
$shouldUseHash = function_exists('hash')
&& function_exists('hash_algos')
&& in_array('md5', hash_algos());
}
return $shouldUseHash ? hash('md5', $string, $binary) : md5($string, $binary);
}
/**
* @deprecated 9.0 Use hash() instead
*/
public static function sha1($string, $binary = false)
{
static $shouldUseHash = null;
if ($shouldUseHash === null)
{
$shouldUseHash = function_exists('hash')
&& function_exists('hash_algos')
&& in_array('sha1', hash_algos());
}
return $shouldUseHash ? hash('sha1', $string, $binary) : sha1($string, $binary);
}
/**
* @deprecated 9.0 Use hash_file() instead
*/
public static function md5_file($filename, $binary = false)
{
static $shouldUseHash = null;
if ($shouldUseHash === null)
{
$shouldUseHash = function_exists('hash')
&& function_exists('hash_algos')
&& in_array('md5', hash_algos());
}
return $shouldUseHash ? hash_file('md5', $filename, $binary) : md5_file($filename, $binary);
}
/**
* @deprecated 9.0 Use hash_file() instead
*/
public static function sha1_file($filename, $binary = false)
{
static $shouldUseHash = null;
if ($shouldUseHash === null)
{
$shouldUseHash = function_exists('hash')
&& function_exists('hash_algos')
&& in_array('sha1', hash_algos());
}
return $shouldUseHash ? hash_file('sha1', $filename, $binary) : sha1_file($filename, $binary);
}
}