Initial Ladill Queue release — enterprise QMS standalone app.
Deploy Ladill Queue / deploy (push) Successful in 56s
Deploy Ladill Queue / deploy (push) Successful in 56s
Phases 1–6: tickets, counters, displays, appointments, workflows, rules, analytics, reports, feedback, admin, device API, and Gitea deploy workflow for queue.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Events;
|
||||
|
||||
class ServiceEventSignature
|
||||
{
|
||||
public static function sign(string $body, string $secret): string
|
||||
{
|
||||
return 'sha256='.hash_hmac('sha256', $body, $secret);
|
||||
}
|
||||
|
||||
public static function verify(string $body, string $signature, string $secret): bool
|
||||
{
|
||||
if ($secret === '' || $signature === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return hash_equals(self::sign($body, $secret), $signature);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user