Skip to content

Commit 60442ee

Browse files
javiereguiluzfabpot
authored andcommitted
Use faster hashing algorithms when possible
1 parent d13205f commit 60442ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Field/FileFormField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function setValue(?string $value): void
5555
$name = $info['basename'];
5656

5757
// copy to a tmp location
58-
$tmp = sys_get_temp_dir().'/'.strtr(substr(base64_encode(hash('sha256', uniqid(mt_rand(), true), true)), 0, 7), '/', '_');
58+
$tmp = sys_get_temp_dir().'/'.strtr(substr(base64_encode(hash('xxh128', uniqid(mt_rand(), true), true)), 0, 7), '/', '_');
5959
if (\array_key_exists('extension', $info)) {
6060
$tmp .= '.'.$info['extension'];
6161
}

0 commit comments

Comments
 (0)