PHP Class Namshi\JOSE\Signer\OpenSSL\PublicKey

Inheritance: implements Namshi\JOSE\Signer\SignerInterface
Datei anzeigen Open project: namshi/jose Class Usage Examples

Public Methods

Method Description
sign ( $input, $key, $password = null )
verify ( $key, $signature, $input )

Protected Methods

Method Description
getHashingAlgorithm ( ) : string Returns the hashing algorithm used in this signer.
getKeyResource ( string | resource $key, string $password = null ) : resource Converts a string representation of a key into an OpenSSL resource.
getSupportedPrivateKeyType ( ) : string Returns the private key type supported in this signer.
supportsKey ( resource $key ) : boolean Check if the key is supported by this signer.

Method Details

getHashingAlgorithm() abstract protected method

Returns the hashing algorithm used in this signer.
abstract protected getHashingAlgorithm ( ) : string
return string

getKeyResource() protected method

Converts a string representation of a key into an OpenSSL resource.
protected getKeyResource ( string | resource $key, string $password = null ) : resource
$key string | resource
$password string
return resource OpenSSL key resource

getSupportedPrivateKeyType() abstract protected method

Returns the private key type supported in this signer.
abstract protected getSupportedPrivateKeyType ( ) : string
return string

sign() public method

public sign ( $input, $key, $password = null )

supportsKey() protected method

Check if the key is supported by this signer.
protected supportsKey ( resource $key ) : boolean
$key resource Public or private key
return boolean

verify() public method

public verify ( $key, $signature, $input )