Files
ladill-meet/app/Services/Events/ServiceEventSignature.php
T
isaaccladandCursor 965fb992e9
Deploy Ladill Meet / deploy (push) Failing after 7s
Initial Ladill Meet release.
Phases 0–18: core meetings, webinar, breakouts, team chat, live streaming, town hall, billing, and Ladill Mail calendar wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 23:35:29 +00:00

24 lines
541 B
PHP

<?php
namespace App\Services\Events;
/**
* HMAC-SHA256 signing for platform service-event webhooks.
*/
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);
}
}