Railgun JWT

SecLibJwkAlgorithm
in package

Implements a PHP Sec Lib backed JWK Algorithm.

Table of Contents

Properties

$transformFunc  : callable(AsymmetricKey): AsymmetricKey

Methods

__construct()  : mixed
algorithms()  : array<string|int, string>
applyIeeeSignatureFormat()  : EC
applyPkcs1Padding()  : RSA
applyPssPadding()  : RSA
create()  : SecLibJwkAlgorithm
defineAlgorithm()  : void
ensureEcKey()  : EC
ensureRsaKey()  : RSA
getAlgorithm()  : string
transform()  : AsymmetricKey
transformEdDsa()  : EC
transformEs256()  : EC
transformEs256K()  : EC
transformEs384()  : EC
transformEs512()  : EC
transformPs256()  : RSA
transformPs384()  : RSA
transformPs512()  : RSA
transformRs256()  : RSA
transformRs384()  : RSA
transformRs512()  : RSA

Properties

Methods

__construct()

public __construct(string $algo, callable(AsymmetricKey): AsymmetricKey $transformFunc) : mixed
Parameters
$algo : string
$transformFunc : callable(AsymmetricKey): AsymmetricKey

algorithms()

public static algorithms() : array<string|int, string>
Return values
array<string|int, string>

applyIeeeSignatureFormat()

public static applyIeeeSignatureFormat(EC $key) : EC
Parameters
$key : EC
Tags
throws
UnexpectedValueException
Return values
EC

applyPkcs1Padding()

public static applyPkcs1Padding(RSA $key) : RSA
Parameters
$key : RSA
Tags
throws
UnexpectedValueException
Return values
RSA

applyPssPadding()

public static applyPssPadding(RSA $key) : RSA
Parameters
$key : RSA
Tags
throws
UnexpectedValueException
Return values
RSA

defineAlgorithm()

public static defineAlgorithm(string $algo, callable(AsymmetricKey): AsymmetricKey $transformFunc) : void
Parameters
$algo : string
$transformFunc : callable(AsymmetricKey): AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

ensureEcKey()

public static ensureEcKey(AsymmetricKey $key) : EC
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

Return values
EC

ensureRsaKey()

public static ensureRsaKey(AsymmetricKey $key) : RSA
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

Return values
RSA

transform()

public transform(AsymmetricKey $key) : AsymmetricKey
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

throws
UnexpectedValueException
Return values
AsymmetricKey

transformEdDsa()

public static transformEdDsa(AsymmetricKey $key) : EC
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

throws
UnexpectedValueException
Return values
EC

transformEs256()

public static transformEs256(AsymmetricKey $key) : EC
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

throws
UnexpectedValueException
Return values
EC

transformEs256K()

public static transformEs256K(AsymmetricKey $key) : EC
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

throws
UnexpectedValueException
Return values
EC

transformEs384()

public static transformEs384(AsymmetricKey $key) : EC
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

throws
UnexpectedValueException
Return values
EC

transformEs512()

public static transformEs512(AsymmetricKey $key) : EC
Parameters
$key : AsymmetricKey
Tags
throws
InvalidArgumentException

If any of the argument types were not as expected.

throws
UnexpectedValueException
Return values
EC

transformPs256()

public static transformPs256(AsymmetricKey $key) : RSA
Parameters
$key : AsymmetricKey
Tags
throws
UnexpectedValueException
Return values
RSA

transformPs384()

public static transformPs384(AsymmetricKey $key) : RSA
Parameters
$key : AsymmetricKey
Tags
throws
UnexpectedValueException
Return values
RSA

transformPs512()

public static transformPs512(AsymmetricKey $key) : RSA
Parameters
$key : AsymmetricKey
Tags
throws
UnexpectedValueException
Return values
RSA

transformRs256()

public static transformRs256(AsymmetricKey $key) : RSA
Parameters
$key : AsymmetricKey
Tags
throws
UnexpectedValueException
Return values
RSA

transformRs384()

public static transformRs384(AsymmetricKey $key) : RSA
Parameters
$key : AsymmetricKey
Tags
throws
UnexpectedValueException
Return values
RSA

transformRs512()

public static transformRs512(AsymmetricKey $key) : RSA
Parameters
$key : AsymmetricKey
Tags
throws
UnexpectedValueException
Return values
RSA

        
On this page

Search results