Skip to content

Commit 04e45bf

Browse files
authored
fix: merge buffers before hashing
Signed-off-by: Denny Septian Panggabean <97607754+ddevsr@users.noreply.github.com>
1 parent 2ccedf9 commit 04e45bf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Secure.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,8 @@ public function _hash(string $algorithm, ...$buffers)
474474
throw new Exception(sprintf("Hash algorithm '%s' not supported!", $algorithm)); // @codeCoverageIgnore
475475
}
476476

477+
$buffers = array_merge([], ...$buffers);
478+
477479
hash_update($ctx, pack('C*', ...$buffers));
478480

479481
return (array) unpack('C*', hash_final($ctx, true));

0 commit comments

Comments
 (0)