We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77b31e5 commit 0f62203Copy full SHA for 0f62203
src/BinaryFile.php
@@ -4,8 +4,7 @@
4
5
namespace Php\Pie;
6
7
-use function file_get_contents;
8
-use function hash;
+use function hash_file;
9
10
/**
11
* @internal This is not public API for PIE, so should not be depended upon unless you accept the risk of BC breaks
@@ -31,7 +30,7 @@ public static function fromFileWithSha256Checksum(string $filePath): self
31
30
{
32
return new self(
33
$filePath,
34
- hash(self::HASH_TYPE_SHA256, file_get_contents($filePath)),
+ hash_file(self::HASH_TYPE_SHA256, $filePath),
35
);
36
}
37
0 commit comments