WebhooksService/TokenVerifier.php
- Package
- Default
\TokenVerifier
Package: Default

Constants
Properties
Methods


encryptPayLoadBasedOnToken( $payLoad, null $hashAlgorithm = null) : string
Encrypt the payload based on hash algorithm and verifier Token
Parameters
Returns
Name | Type | Description |
---|---|---|
$payLoad | ||
$hashAlgorithm | null |
Type | Description |
---|---|
string |


verifyPayLoad( $payLoad, $sig, null $algo = null) : boolean
Using the token to encrypt payload and compare with sig
Parameters
Returns
Name | Type | Description |
---|---|---|
$payLoad | The payload to be verified | |
$sig | The signature retrieved from header | |
$algo | null | The algo used to encrypt |
Type | Description |
---|---|
boolean | True if same false otherwise |