Unit tests for Crypto package

This commit is contained in:
Marcin Łojewski
2018-06-10 21:30:01 +02:00
parent 97146d6429
commit f2f3a897a5
22 changed files with 1003 additions and 7 deletions

View File

@@ -59,6 +59,12 @@ class CryptArgon2 extends AbstractAlgorithm
$timeCost = PASSWORD_ARGON2_DEFAULT_TIME_COST,
$threads = PASSWORD_ARGON2_DEFAULT_THREADS
) {
if (version_compare(PHP_VERSION, "7.2.0") === -1) {
throw new \RuntimeException(
"PASSWORD_ARGON2I requires PHP 7.2.0 or above."
);
}
parent::__construct($localization);
$this->memoryCost = $memoryCost;
$this->timeCost = $timeCost;