JWKFactory.php
public static function createFromKeyFile(string $file, ?string $password = null, array $additional_values = []): JWK
    {
        $values = KeyConverter::loadFromKeyFile($file, $password);
        $values = \array_merge($values, $additional_values);

        return JWK::create($values);
    }
public static function createFromKeyFile(string $file, ?string $password = null, array $additional_values = []): JWK
    {
        $values = KeyConverter::loadFromKeyFile($file, $password);
        $values = \array_merge($values, $additional_values);

        return JWK::create($values);
    }
public static function createFromKeyFile ( string $ file , ? string $ password = null , array $ additional_values = [ ] ) : JWK { $ values = KeyConverter :: loadFromKeyFile ( $ file , $ password ) ; $ values = \ array_merge ( $ values , $ additional_values ) ; return JWK :: create ( $ values ) ; }
This method will try to load and convert a key file into a JWK object.
If the key is encrypted, the password must be set.

@throws \Exception
This method will try to load and convert a key file into a JWK object . If the key is encrypted the password must be set .