mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +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",
|
||||
"mbstring" => "Multibyte String",
|
||||
"yaml" => "YAML",
|
||||
"openssl" => "OpenSSL",
|
||||
"sockets" => "Sockets",
|
||||
"zip" => "Zip",
|
||||
"zlib" => "Zlib"
|
||||
|
@ -111,7 +111,7 @@ class ZippedResourcePack implements ResourcePack{
|
||||
|
||||
public function getSha256(bool $cached = true) : string{
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user