You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
748 B

diff --git a/src/Algorithm/Shamir.php b/src/Algorithm/Shamir.php
index 145c192..f78e18e 100644
--- a/src/Algorithm/Shamir.php
+++ b/src/Algorithm/Shamir.php
@@ -371,14 +371,14 @@ class Shamir implements Algorithm, RandomGeneratorAware
protected function unpack(string $string): array
{
$chunk = 0;
- $int = null;
+ $int = '';
$return = [];
foreach (unpack('C*', $string) as $byte) {
$int = bcadd($int, bcmul($byte, bcpow(2, $chunk * 8)));
if (++$chunk === $this->chunkSize) {
$return[] = $int;
$chunk = 0;
- $int = null;
+ $int = '';
}
}
if ($chunk > 0) {