Add openssl argon2 password hash support for PHP 8.5

This commit is contained in:
crazywhalecc
2025-07-30 23:02:28 +08:00
parent 9ed3c8b498
commit 5f5d934d58
5 changed files with 37 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
trait openssl
{
public function getLibVersion(): ?string
{
// get openssl version from source directory
if (file_exists("{$this->source_dir}/VERSION.dat")) {
// parse as INI
$version = parse_ini_file("{$this->source_dir}/VERSION.dat");
if ($version !== false) {
return "{$version['MAJOR']}.{$version['MINOR']}.{$version['PATCH']}";
}
}
return null;
}
}