@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | do { |
132 | 132 | /* Get the message hash and a new random number */ |
133 | - $e = $this->decodeHex('0x' . hash('sha256', $message)); |
|
133 | + $e = $this->decodeHex('0x'.hash('sha256', $message)); |
|
134 | 134 | $k = $this->SecureRandomNumber(); |
135 | 135 | |
136 | 136 | /* Calculate a new curve point from R=k*G (x1,y1) */ |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | } while ($this->zeroCompare($r, $s)); |
148 | 148 | |
149 | 149 | } catch (\Exception $e) { |
150 | - throw new SignatureException("Caught the following exception in Signature::Generate(): " . $e->getMessage(), 0, $e); |
|
150 | + throw new SignatureException("Caught the following exception in Signature::Generate(): ".$e->getMessage(), 0, $e); |
|
151 | 151 | } catch (\Error $e) { |
152 | - throw new SignatureException("Fatal error in Signature::Generate(): " . $e->getMessage(), 0, $e); |
|
152 | + throw new SignatureException("Fatal error in Signature::Generate(): ".$e->getMessage(), 0, $e); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | $signature = array( |
@@ -230,9 +230,9 @@ discard block |
||
230 | 230 | return $congruent; |
231 | 231 | |
232 | 232 | } catch (\Exception $e) { |
233 | - throw new SignatureException("Caught the following exception in Signature::Verify(): " . $e->getMessage(), 0, $e); |
|
233 | + throw new SignatureException("Caught the following exception in Signature::Verify(): ".$e->getMessage(), 0, $e); |
|
234 | 234 | } catch (\Error $e) { |
235 | - throw new SignatureException("Fatal error in Signature::Verify(): " . $e->getMessage(), 0, $e); |
|
235 | + throw new SignatureException("Fatal error in Signature::Verify(): ".$e->getMessage(), 0, $e); |
|
236 | 236 | } |
237 | 237 | } |
238 | 238 | |
@@ -251,14 +251,14 @@ discard block |
||
251 | 251 | $s = $this->binConv($this->CoordinateCheck($s)); |
252 | 252 | |
253 | 253 | $retval = array( |
254 | - 'bin_r' => $this->msbCheck($r[0]) . $r, |
|
255 | - 'bin_s' => $this->msbCheck($s[0]) . $s |
|
254 | + 'bin_r' => $this->msbCheck($r[0]).$r, |
|
255 | + 'bin_s' => $this->msbCheck($s[0]).$s |
|
256 | 256 | ); |
257 | 257 | |
258 | - $seq = chr(0x02) . chr(strlen($retval['bin_r'])) . $retval['bin_r'] . |
|
259 | - chr(0x02) . chr(strlen($retval['bin_s'])) . $retval['bin_s']; |
|
258 | + $seq = chr(0x02).chr(strlen($retval['bin_r'])).$retval['bin_r']. |
|
259 | + chr(0x02).chr(strlen($retval['bin_s'])).$retval['bin_s']; |
|
260 | 260 | |
261 | - return bin2hex(chr(0x30) . chr(strlen($seq)) . $seq); |
|
261 | + return bin2hex(chr(0x30).chr(strlen($seq)).$seq); |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | /** |