CS adjustments

This commit is contained in:
terrafrost 2023-11-01 20:26:03 -05:00
parent 8714be625b
commit b19dd5ec7b
3 changed files with 5 additions and 7 deletions

View File

@ -15,6 +15,8 @@
* @link http://phpseclib.sourceforge.net
*/
declare(strict_types=1);
namespace phpseclib3\Crypt\EC\Formats\Signature;
use phpseclib3\Math\BigInteger;
@ -51,12 +53,8 @@ abstract class IEEE
/**
* Returns a signature in the appropriate format
*
* @param \phpseclib3\Math\BigInteger $r
* @param \phpseclib3\Math\BigInteger $s
* @return string
*/
public static function save(BigInteger $r, BigInteger $s)
public static function save(BigInteger $r, BigInteger $s): string
{
$r = $r->toBytes();
$s = $s->toBytes();

View File

@ -696,7 +696,7 @@ cN6W+k8UvGf+Y/lDWNbFitQocabsDUvSN0edHH3UKP5QPTz4cOlyIPMrXQ==
/**
* @group github1956
*/
public function testIEEESignature()
public function testIEEESignature(): void
{
$key = '{"alg":"ES256","crv":"P-256","ext":true,"key_ops":["verify"],"kty":"EC","x":"FKwqyGd4i2NAl8RUXCCBRCAIbcpeGyfyXwgA_AWHb8Y","y":"njxhw5O6zGVkBlcPDKYj0E-6VO1giHTUkJWBhgKNqd8"}';
$key = PublicKeyLoader::load($key)->withSignatureFormat('IEEE')->withHash('sha384');

View File

@ -23,7 +23,7 @@ class PrimeFieldTest extends PhpseclibTestCase
$num2->squareRoot();
}
public function testPrimeFieldWithPrimeNumbers()
public function testPrimeFieldWithPrimeNumbers(): void
{
$a = new BigInteger('65', 10);
$p = new BigInteger('127', 10);