mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 20:12:44 +00:00
parent
b9cd84108c
commit
2a6f5f825a
@ -262,8 +262,11 @@ abstract class AsymmetricKey
|
|||||||
{
|
{
|
||||||
if (!isset(self::$plugins[static::ALGORITHM][$format])) {
|
if (!isset(self::$plugins[static::ALGORITHM][$format])) {
|
||||||
self::$plugins[static::ALGORITHM][$format] = [];
|
self::$plugins[static::ALGORITHM][$format] = [];
|
||||||
foreach (glob(__DIR__ . '/../' . static::ALGORITHM . '/' . $format . '/*.php') as $file) {
|
foreach (new \DirectoryIterator(__DIR__ . '/../' . static::ALGORITHM . '/' . $format . '/') as $file) {
|
||||||
$name = pathinfo($file, PATHINFO_FILENAME);
|
if ($file->getExtension() != 'php') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$name = $file->getBasename('.php');
|
||||||
$type = 'phpseclib\Crypt\\' . static::ALGORITHM . '\\' . $format . '\\' . $name;
|
$type = 'phpseclib\Crypt\\' . static::ALGORITHM . '\\' . $format . '\\' . $name;
|
||||||
self::$plugins[static::ALGORITHM][$format][strtolower($name)] = $type;
|
self::$plugins[static::ALGORITHM][$format][strtolower($name)] = $type;
|
||||||
self::$origPlugins[static::ALGORITHM][$format][] = $name;
|
self::$origPlugins[static::ALGORITHM][$format][] = $name;
|
||||||
|
Loading…
Reference in New Issue
Block a user