| @@ 524-530 (lines=7) @@ | ||
| 521 | $resY = gmp_strval($y[0], 16); |
|
| 522 | if(gmp_strval(gmp_mod($y[1], gmp_init(2, 10)), 10) === '0') |
|
| 523 | $resY = gmp_strval($y[1], 16); |
|
| 524 | if($resY !== null) |
|
| 525 | { |
|
| 526 | while(strlen($resY) < 64) |
|
| 527 | { |
|
| 528 | $resY = '0' . $resY; |
|
| 529 | } |
|
| 530 | } |
|
| 531 | return $resY; |
|
| 532 | } |
|
| 533 | else if($derEvenOrOddCode === '03') // odd |
|
| @@ 540-546 (lines=7) @@ | ||
| 537 | $resY = gmp_strval($y[0], 16); |
|
| 538 | if(gmp_strval(gmp_mod($y[1], gmp_init(2, 10)), 10) === '1') |
|
| 539 | $resY = gmp_strval($y[1], 16); |
|
| 540 | if($resY !== null) |
|
| 541 | { |
|
| 542 | while(strlen($resY) < 64) |
|
| 543 | { |
|
| 544 | $resY = '0' . $resY; |
|
| 545 | } |
|
| 546 | } |
|
| 547 | return $resY; |
|
| 548 | } |
|
| 549 | ||