mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +00:00
Use hash_file instead of OpenSSL for resource pack hashing
Epic facepalm. I totally forgot this function existed. >_<
This commit is contained in:
parent
8114ceaf68
commit
8a28021b44
@ -431,7 +431,6 @@ namespace pocketmine {
|
|||||||
"json" => "JSON",
|
"json" => "JSON",
|
||||||
"mbstring" => "Multibyte String",
|
"mbstring" => "Multibyte String",
|
||||||
"yaml" => "YAML",
|
"yaml" => "YAML",
|
||||||
"openssl" => "OpenSSL",
|
|
||||||
"sockets" => "Sockets",
|
"sockets" => "Sockets",
|
||||||
"zip" => "Zip",
|
"zip" => "Zip",
|
||||||
"zlib" => "Zlib"
|
"zlib" => "Zlib"
|
||||||
|
@ -111,7 +111,7 @@ class ZippedResourcePack implements ResourcePack{
|
|||||||
|
|
||||||
public function getSha256(bool $cached = true) : string{
|
public function getSha256(bool $cached = true) : string{
|
||||||
if($this->sha256 === null or !$cached){
|
if($this->sha256 === null or !$cached){
|
||||||
$this->sha256 = openssl_digest(file_get_contents($this->path), "sha256", true);
|
$this->sha256 = hash_file("sha256", $this->path, true);
|
||||||
}
|
}
|
||||||
return $this->sha256;
|
return $this->sha256;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user