<?php

declare(strict_types=1);

namespace App\Framework\Webhook\Security\Providers;

use App\Framework\Webhook\ValueObjects\WebhookSignature;

/**
 * Interface for provider-specific webhook signature handling
 * Enables support for different signature formats and verification methods
 */
interface SignatureProvider
{
    /**
     * Verify a webhook signature against the payload
     */
    public function verify(string $payload, string $signatureHeader, string $secret): bool;

    /**
     * Parse signature from HTTP header value
     */
    public function parseSignature(string $headerValue): WebhookSignature;

    /**
     * Generate signature for outgoing webhooks
     */
    public function generateSignature(string $payload, string $secret): string;

    /**
     * Get the expected header name for this provider
     */
    public function getSignatureHeader(): string;

    /**
     * Get provider name
     */
    public function getProviderName(): string;
}
