Jose\KeyConverter\KeyConverter::loadFromKeyFile PHP Метод

loadFromKeyFile() публичный статический Метод

public static loadFromKeyFile ( string $file, null | string $password = null ) : array
$file string
$password null | string
Результат array
    public static function loadFromKeyFile($file, $password = null)
    {
        $content = file_get_contents($file);
        return self::loadFromKey($content, $password);
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public static function createFromKeyFile($file, $password = null, array $additional_values = [])
 {
     $values = KeyConverter::loadFromKeyFile($file, $password);
     $values = array_merge($values, $additional_values);
     return new JWK($values);
 }