Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Libriciel/php-password
1 result
Show changes
Commits on Source (2)
......@@ -24,6 +24,9 @@ build:
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY
- docker push ${CONTAINER_IMAGE}
security_scan:
allow_failure: true
.tests:
stage: test
image: "$CONTAINER_IMAGE"
......
# 3.0.1 - 2023-02-15
- Fix PasswordStrengthMeterAnssi::entropy() qui renvoyait un string à la place d'un float
# 3.0.0 - 2022-02-24
## Evolution
......@@ -6,7 +10,7 @@
## Suppression
- Retrait de la commande symfony de génération de mot de passe (non utilisatble dans le programme qui importe la lib)
- Retrait de la commande symfony de génération de mot de passe (non utilisable dans le programme qui importe la lib)
# 2.0.1 - 2021-12-29
......
<?php
declare(strict_types=1);
namespace Libriciel\Password\Service;
/**
......@@ -78,7 +80,7 @@ class PasswordStrengthMeterAnssi implements PasswordStrengthMeterInterface
$length = mb_strlen($string);
$symbols = $this->symbols($string);
$value = $length * log($symbols, 2);
return sprintf("%.{$precision}f", $value);
return round($value, $precision);
}
/**
......
<?php
declare(strict_types=1);
namespace LibricielTest\Password\Service;
use Libriciel\Password\Service\PasswordStrengthMeterAnssi;
......