Use hash_file instead of OpenSSL for resource pack hashing

Epic facepalm. I totally forgot this function existed. >_<
This commit is contained in:
Dylan K. Taylor 2017-03-18 21:46:02 +00:00
parent 8114ceaf68
commit 8a28021b44
2 changed files with 1 additions and 2 deletions

View File

@ -431,7 +431,6 @@ namespace pocketmine {
"json" => "JSON",
"mbstring" => "Multibyte String",
"yaml" => "YAML",
"openssl" => "OpenSSL",
"sockets" => "Sockets",
"zip" => "Zip",
"zlib" => "Zlib"

View File

@ -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;
}