mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Add openssl argon2 password hash support for PHP 8.5
This commit is contained in:
21
src/SPC/builder/unix/library/openssl.php
Normal file
21
src/SPC/builder/unix/library/openssl.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user