From 6d70bb98108ab5a99b038d73d80cb8041ff1ab33 Mon Sep 17 00:00:00 2001 From: baibaratsky Date: Sat, 18 Apr 2015 02:03:04 +0300 Subject: [PATCH] Bug fixed in bcpowmod --- Signer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Signer.php b/Signer.php index 2d364b6..0b16b19 100644 --- a/Signer.php +++ b/Signer.php @@ -62,7 +62,7 @@ public function sign($data) $base = pack('v', strlen($base)) . $base; // Modular exponentiation - $dec = bcpowmod(self::reverseToDecimal($base), $this->power, $this->modulus); + $dec = bcpowmod(self::reverseToDecimal($base), $this->power, $this->modulus, 0); // Convert result to hexadecimal $hex = self::dec2hex($dec);