Method | Description | |
---|---|---|
addKey ( Jose\Object\JWKInterface $key ) | Add key in the key set. | |
countKeys ( ) : integer | ||
getKey ( $index ) : Jose\Object\JWKInterface | ||
getKeys ( ) : Jose\Object\JWKInterface[] | Returns all keys in the key set. | |
hasKey ( $index ) : boolean | ||
removeKey ( integer $index ) | Remove key from the key set. | |
selectKey ( string $type, string | null $algorithm = null, array $restrictions = [] ) : Jose\Object\JWKInterface | null | ||
toPEM ( ) : string[] | Returns RSA/EC keys in the key set into PEM format Note that if the key set contains other key types (none, oct, OKP. |
public addKey ( Jose\Object\JWKInterface $key ) | ||
$key | Jose\Object\JWKInterface |
public getKey ( $index ) : Jose\Object\JWKInterface | ||
$index | ||
return | Jose\Object\JWKInterface |
public getKeys ( ) : Jose\Object\JWKInterface[] | ||
return | Jose\Object\JWKInterface[] | An array of keys stored in the key set |
public selectKey ( string $type, string | null $algorithm = null, array $restrictions = [] ) : Jose\Object\JWKInterface | null | ||
$type | string | Must be 'sig' (signature) or 'enc' (encryption) |
$algorithm | string | null | Specifies the algorithm to be used |
$restrictions | array | More restrictions such as 'kid' or 'kty' |
return | Jose\Object\JWKInterface | null |
public toPEM ( ) : string[] | ||
return | string[] |