PHP Class Jose\KeyConverter\KeyConverter

显示文件 Open project: spomky-labs/jose Class Usage Examples

Public Methods

Method Description
loadFromKey ( string $key, null | string $password = null ) : array
loadFromKeyFile ( string $file, null | string $password = null ) : array
loadFromX5C ( array $x5c ) : array
loadKeyFromCertificate ( string $certificate ) : array
loadKeyFromCertificateFile ( string $file ) : array
loadKeyFromX509Resource ( resource $res ) : array

Private Methods

Method Description
calculateX509Fingerprint ( string $pem, string $algorithm, boolean $binary = false ) : string
convertDerToPem ( string $der_data ) : string
decodePem ( string $pem, array $matches, null | string $password = null ) : string
loadKeyFromDER ( string $der, null | string $password = null ) : array
loadKeyFromPEM ( string $pem, null | string $password = null ) : array
sanitizePEM ( string &$pem ) This method modify the PEM to get 64 char lines and fix bug with old OpenSSL versions.

Method Details

loadFromKey() public static method

public static loadFromKey ( string $key, null | string $password = null ) : array
$key string
$password null | string
return array

loadFromKeyFile() public static method

public static loadFromKeyFile ( string $file, null | string $password = null ) : array
$file string
$password null | string
return array

loadFromX5C() public static method

public static loadFromX5C ( array $x5c ) : array
$x5c array
return array

loadKeyFromCertificate() public static method

public static loadKeyFromCertificate ( string $certificate ) : array
$certificate string
return array

loadKeyFromCertificateFile() public static method

public static loadKeyFromCertificateFile ( string $file ) : array
$file string
return array

loadKeyFromX509Resource() public static method

public static loadKeyFromX509Resource ( resource $res ) : array
$res resource
return array