Skip to content

Commit a60f761

Browse files
committed
Replace md5 with xxhash
1 parent 2db5eb2 commit a60f761

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Middleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ class Middleware
2929
public function version(Request $request)
3030
{
3131
if (config('app.asset_url')) {
32-
return md5(config('app.asset_url'));
32+
return hash('xxh128', config('app.asset_url'));
3333
}
3434

3535
if (file_exists($manifest = public_path('mix-manifest.json'))) {
36-
return md5_file($manifest);
36+
return hash_file('xxh128', $manifest);
3737
}
3838

3939
if (file_exists($manifest = public_path('build/manifest.json'))) {
40-
return md5_file($manifest);
40+
return hash_file('xxh128', $manifest);
4141
}
4242

4343
return null;

tests/ResponseFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function test_the_version_can_be_a_closure(): void
109109
$this->assertSame('', Inertia::getVersion());
110110

111111
Inertia::version(function () {
112-
return md5('Inertia');
112+
return hash('xxh128', 'Inertia');
113113
});
114114

115115
return Inertia::render('User/Edit');

0 commit comments

Comments
 (0)