Verify a signature with the mesage, key and method. Not all methods
are symmetric, so we must have a separate verify and sign method.
public static verify ( string $msg, string $signature, string | resource $key, string $method = 'HS256' ) : boolean | ||
$msg | string | the original message |
$signature | string | |
$key | string | resource | for HS*, a string key works. for RS*, must be a resource of an openssl public key |
$method | string | |
Результат | boolean |