Skip to main content

SignatureJws

Represents a JSON Web Signature (JWS). RFC 7515.

  • Full name: \Bloock\Entity\Authenticity\SignatureJws

Properties​

signature​

private string $signature

protected​

private string $protected

private \Bloock\Entity\Authenticity\SignatureHeaderJws $header

messageHash​

private string $messageHash

Methods​

__construct​

Constructs a SignatureJws object with the specified parameters.

public __construct(string $signature, string $protected, \Bloock\Entity\Authenticity\SignatureHeaderJws $signatureHeader, string $messageHash): mixed

Parameters:

ParameterTypeDescription
$signaturestring
$protectedstring
$signatureHeader\Bloock\Entity\Authenticity\SignatureHeaderJws
$messageHashstring

fromProto​

public static fromProto(\Bloock\SignatureJWS $signature): \Bloock\Entity\Authenticity\SignatureJws
  • This method is static.

Parameters:

ParameterTypeDescription
$signature\Bloock\SignatureJWS

getSignature​

Gets the cryptographic signature.

public getSignature(): string

setSignature​

Sets the cryptographic signature.

public setSignature(string $signature): void

Parameters:

ParameterTypeDescription
$signaturestring

getProtected​

Gets the "protected" header parameter of the JWS.

public getProtected(): string

getHeader​

Gets the header containing algorithm and key identifier metadata for the JWS.

public getHeader(): \Bloock\Entity\Authenticity\SignatureHeaderJws

getMessageHash​

Gets the signature message hash.

public getMessageHash(): string

setMessageHash​

Sets the hash of the message that was signed.

public setMessageHash(string $messageHash): void

Parameters:

ParameterTypeDescription
$messageHashstring

toProto​

public toProto(): \Bloock\SignatureJWS

getAlg​

Gets the algorithm used for the JWS signature.

public getAlg(): string


Automatically generated on 2024-04-17