HumHub Documentation (unofficial)

RSAPSS
in package
implements SignatureAlgorithm

AbstractYes

Table of Contents

Interfaces

SignatureAlgorithm

Methods

allowedKeyTypes()  : array<string|int, string>
Returns the key types suitable for this algorithm (e.g. "oct", "RSA"...).
sign()  : string
Sign the input.
verify()  : bool
Verify the signature of data.
getAlgorithm()  : string
checkKey()  : void

Methods

allowedKeyTypes()

Returns the key types suitable for this algorithm (e.g. "oct", "RSA"...).

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

sign()

Sign the input.

public sign(JWK $key, string $input) : string
Parameters
$key : JWK

The private key used to sign the data

$input : string

The input

Tags
throws
InvalidArgumentException

if the key is not private

Return values
string

verify()

Verify the signature of data.

public verify(JWK $key, string $input, string $signature) : bool
Parameters
$key : JWK

The private key used to sign the data

$input : string

The input

$signature : string

The signature to verify

Return values
bool

getAlgorithm()

protected abstract getAlgorithm() : string
Return values
string

checkKey()

private checkKey(JWK $key) : void
Parameters
$key : JWK
Tags
throws
InvalidArgumentException

if the key type is not allowed

throws
InvalidArgumentException

if the key is not valid


        
On this page

Search results