improve cryptography implementation #305
mutation-tests-diff.yml
on: pull_request
Matrix: Mutation tests on diff
Annotations
1 error and 10 warnings
|
Mutation tests on diff (locked, 8.5, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/OpensslCipher.php#L59
Escaped Mutant for Mutator "Identical":
@@ @@
{
$tag = $parameter->tag !== null ? base64_decode($parameter->tag, true) : null;
- if ($parameter->tag !== null && $tag === false) {
+ if ($parameter->tag !== null && $tag !== false) {
throw DecryptionFailed::invalidBase64('tag');
}
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/OpensslCipher.php#L59
Escaped Mutant for Mutator "NotIdentical":
@@ @@
{
$tag = $parameter->tag !== null ? base64_decode($parameter->tag, true) : null;
- if ($parameter->tag !== null && $tag === false) {
+ if ($parameter->tag === null && $tag === false) {
throw DecryptionFailed::invalidBase64('tag');
}
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/OpensslCipher.php#L31
Escaped Mutant for Mutator "GreaterThan":
@@ @@
throw EncryptionFailed::invalidIvLength($key->method);
}
- $nonce = $ivLength > 0 ? openssl_random_pseudo_bytes($ivLength) : null;
+ $nonce = $ivLength >= 0 ? openssl_random_pseudo_bytes($ivLength) : null;
$tag = null;
$encryptedData = @openssl_encrypt(
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/OpensslCipher.php#L28
Escaped Mutant for Mutator "Throw_":
@@ @@
$ivLength = @openssl_cipher_iv_length($key->method);
if ($ivLength === false) {
- throw EncryptionFailed::invalidIvLength($key->method);
+ EncryptionFailed::invalidIvLength($key->method);
}
$nonce = $ivLength > 0 ? openssl_random_pseudo_bytes($ivLength) : null;
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/EncryptionFailed.php#L18
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
{
private function __construct(string $message, Throwable|null $previous = null)
{
- parent::__construct($message, 0, $previous);
+ parent::__construct($message, 1, $previous);
}
public static function forMethod(string $method, Throwable|null $previous = null): self
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/EncryptionFailed.php#L18
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
{
private function __construct(string $message, Throwable|null $previous = null)
{
- parent::__construct($message, 0, $previous);
+ parent::__construct($message, -1, $previous);
}
public static function forMethod(string $method, Throwable|null $previous = null): self
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/DecryptionFailed.php#L18
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
{
private function __construct(string $message, Throwable|null $previous = null)
{
- parent::__construct($message, 0, $previous);
+ parent::__construct($message, 1, $previous);
}
public static function forMethod(string $method, Throwable|null $previous = null): self
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/DecryptionFailed.php#L18
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
{
private function __construct(string $message, Throwable|null $previous = null)
{
- parent::__construct($message, 0, $previous);
+ parent::__construct($message, -1, $previous);
}
public static function forMethod(string $method, Throwable|null $previous = null): self
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/CreateCipherKeyFailed.php#L18
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
{
private function __construct(string $message, Throwable|null $previous = null)
{
- parent::__construct($message, 0, $previous);
+ parent::__construct($message, 1, $previous);
}
public static function forMethod(string $method, string $reason): self
|
|
Mutation tests on diff (locked, 8.5, ubuntu-latest):
src/Extension/Cryptography/Cipher/CreateCipherKeyFailed.php#L18
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
{
private function __construct(string $message, Throwable|null $previous = null)
{
- parent::__construct($message, 0, $previous);
+ parent::__construct($message, -1, $previous);
}
public static function forMethod(string $method, string $reason): self
|