Skip to content

Commit

Permalink
md5 replaced with xxHash
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Jun 11, 2024
1 parent 83d9a41 commit 29fe51b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DI/ContainerLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function load(callable $generator, mixed $key = null): string

public function getClassName(mixed $key): string
{
return 'Container_' . substr(md5(serialize($key)), 0, 10);
return 'Container_' . substr(hash('xxh128', serialize($key)), 0, 10);
}


Expand Down
2 changes: 1 addition & 1 deletion src/DI/DependencyChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class_uses($name),
];
}

return md5(serialize($hash));
return hash('xxh128', serialize($hash));
}


Expand Down

0 comments on commit 29fe51b

Please sign in to comment.