Rev 846 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 846 | Rev 874 | ||
---|---|---|---|
Line 11... | Line 11... | ||
11 | * and subtraction become the same operation as XOR. |
11 | * and subtraction become the same operation as XOR. |
12 | * eg. 1 + 1 + 1 == 3 % 2 == 1 or 0 - 1 == -1 % 2 == 1 |
12 | * eg. 1 + 1 + 1 == 3 % 2 == 1 or 0 - 1 == -1 % 2 == 1 |
13 | * |
13 | * |
14 | * PHP version 5 and 7 |
14 | * PHP version 5 and 7 |
15 | * |
15 | * |
- | 16 | * @category Math |
|
- | 17 | * @package BigInteger |
|
16 | * @author Jim Wigginton <terrafrost@php.net> |
18 | * @author Jim Wigginton <terrafrost@php.net> |
17 | * @copyright 2017 Jim Wigginton |
19 | * @copyright 2017 Jim Wigginton |
18 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
20 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
19 | */ |
21 | */ |
20 | 22 | ||
Line 26... | Line 28... | ||
26 | use phpseclib3\Math\Common\FiniteField\Integer as Base; |
28 | use phpseclib3\Math\Common\FiniteField\Integer as Base; |
27 | 29 | ||
28 | /** |
30 | /** |
29 | * Binary Finite Fields |
31 | * Binary Finite Fields |
30 | * |
32 | * |
- | 33 | * @package Math |
|
31 | * @author Jim Wigginton <terrafrost@php.net> |
34 | * @author Jim Wigginton <terrafrost@php.net> |
- | 35 | * @access public |
|
32 | */ |
36 | */ |
33 | class Integer extends Base |
37 | class Integer extends Base |
34 | { |
38 | { |
35 | /** |
39 | /** |
36 | * Holds the BinaryField's value |
40 | * Holds the BinaryField's value |
Line 497... | Line 501... | ||
497 | } |
501 | } |
498 | 502 | ||
499 | /** |
503 | /** |
500 | * __toString() magic method |
504 | * __toString() magic method |
501 | * |
505 | * |
- | 506 | * @access public |
|
502 | */ |
507 | */ |
503 | public function __toString() |
508 | public function __toString() |
504 | { |
509 | { |
505 | return (string) $this->toBigInteger(); |
510 | return (string) $this->toBigInteger(); |
506 | } |
511 | } |
507 | 512 | ||
508 | /** |
513 | /** |
509 | * __debugInfo() magic method |
514 | * __debugInfo() magic method |
510 | * |
515 | * |
- | 516 | * @access public |
|
511 | */ |
517 | */ |
512 | public function __debugInfo() |
518 | public function __debugInfo() |
513 | { |
519 | { |
514 | return ['value' => $this->toHex()]; |
520 | return ['value' => $this->toHex()]; |
515 | } |
521 | } |