Configure documentation site #2373
Annotations
11 warnings
Mutation tests (locked, 7.4, ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2, codecov/codecov-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L52
Escaped Mutant:
--- Original
+++ New
@@ @@
if (self::octetLength($points) !== $length) {
throw ConversionFailed::invalidLength();
}
- $pointR = self::preparePositiveInteger(mb_substr($points, 0, $length, '8bit'));
+ $pointR = self::preparePositiveInteger(substr($points, 0, $length));
$pointS = self::preparePositiveInteger(mb_substr($points, $length, null, '8bit'));
$lengthR = self::octetLength($pointR);
$lengthS = self::octetLength($pointS);
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L59
Escaped Mutant:
--- Original
+++ New
@@ @@
$lengthR = self::octetLength($pointR);
$lengthS = self::octetLength($pointS);
$totalLength = $lengthR + $lengthS + self::BYTE_SIZE + self::BYTE_SIZE;
- $lengthPrefix = $totalLength > self::ASN1_MAX_SINGLE_BYTE ? self::ASN1_LENGTH_2BYTES : '';
+ $lengthPrefix = $totalLength >= self::ASN1_MAX_SINGLE_BYTE ? self::ASN1_LENGTH_2BYTES : '';
$asn1 = hex2bin(self::ASN1_SEQUENCE . $lengthPrefix . dechex($totalLength) . self::ASN1_INTEGER . dechex($lengthR) . $pointR . self::ASN1_INTEGER . dechex($lengthS) . $pointS);
assert(is_string($asn1));
return $asn1;
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L74
Escaped Mutant:
--- Original
+++ New
@@ @@
}
private static function octetLength(string $data) : int
{
- return (int) (mb_strlen($data, '8bit') / self::BYTE_SIZE);
+ return (int) (strlen($data) / self::BYTE_SIZE);
}
private static function preparePositiveInteger(string $data) : string
{
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L74
Escaped Mutant:
--- Original
+++ New
@@ @@
}
private static function octetLength(string $data) : int
{
- return (int) (mb_strlen($data, '8bit') / self::BYTE_SIZE);
+ return mb_strlen($data, '8bit') / self::BYTE_SIZE;
}
private static function preparePositiveInteger(string $data) : string
{
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L79
Escaped Mutant:
--- Original
+++ New
@@ @@
}
private static function preparePositiveInteger(string $data) : string
{
- if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) {
+ if (substr($data, 0, self::BYTE_SIZE) > self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) {
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L79
Escaped Mutant:
--- Original
+++ New
@@ @@
}
private static function preparePositiveInteger(string $data) : string
{
- if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) {
+ if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') >= self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) {
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L84
Escaped Mutant:
--- Original
+++ New
@@ @@
if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
- while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) {
+ while (substr($data, 0, self::BYTE_SIZE) === self::ASN1_NEGATIVE_INTEGER && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) {
$data = mb_substr($data, 2, null, '8bit');
}
return $data;
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L85
Escaped Mutant:
--- Original
+++ New
@@ @@
if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
- while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) {
+ while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER && mb_substr($data, 2, self::BYTE_SIZE, '8bit') < self::ASN1_BIG_INTEGER_LIMIT) {
$data = mb_substr($data, 2, null, '8bit');
}
return $data;
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L85
Escaped Mutant:
--- Original
+++ New
@@ @@
if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) {
return self::ASN1_NEGATIVE_INTEGER . $data;
}
- while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) {
+ while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER && substr($data, 2, self::BYTE_SIZE) <= self::ASN1_BIG_INTEGER_LIMIT) {
$data = mb_substr($data, 2, null, '8bit');
}
return $data;
|
Mutation tests (locked, 7.4, ubuntu-latest):
src/Signer/Ecdsa/MultibyteStringConverter.php#L130
Escaped Mutant:
--- Original
+++ New
@@ @@
if (self::readAsn1Content($message, $position, self::BYTE_SIZE) !== self::ASN1_INTEGER) {
throw ConversionFailed::integerExpected();
}
- $length = (int) hexdec(self::readAsn1Content($message, $position, self::BYTE_SIZE));
+ $length = hexdec(self::readAsn1Content($message, $position, self::BYTE_SIZE));
return self::readAsn1Content($message, $position, $length * self::BYTE_SIZE);
}
private static function retrievePositiveInteger(string $data) : string
|