mirror of
https://github.com/kvazar-network/crypto-php.git
synced 2025-01-31 09:14:42 +00:00
fix data types
This commit is contained in:
parent
6ac12c61fc
commit
857f554689
16
src/Tool.php
16
src/Tool.php
@ -35,13 +35,13 @@ class Tool
|
|||||||
while ($dec > $base - 1)
|
while ($dec > $base - 1)
|
||||||
{
|
{
|
||||||
$rest = bcmod(
|
$rest = bcmod(
|
||||||
$dec,
|
(string) $dec,
|
||||||
$base
|
(string) $base
|
||||||
);
|
);
|
||||||
|
|
||||||
$dec = bcdiv(
|
$dec = bcdiv(
|
||||||
$dec,
|
(string) $dec,
|
||||||
$base
|
(string) $base
|
||||||
);
|
);
|
||||||
|
|
||||||
$value = $digits[$rest] . $value;
|
$value = $digits[$rest] . $value;
|
||||||
@ -89,15 +89,15 @@ class Tool
|
|||||||
);
|
);
|
||||||
|
|
||||||
$power = bcpow(
|
$power = bcpow(
|
||||||
$base,
|
(string) $base,
|
||||||
$size - $loop - 1
|
(string) ($size - $loop - 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
$dec = bcadd(
|
$dec = bcadd(
|
||||||
$dec,
|
$dec,
|
||||||
bcmul(
|
bcmul(
|
||||||
$element,
|
(string) $element,
|
||||||
$power
|
(string) $power
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user