<?php

namespace Gaco\SnapBi\Services;

use Gaco\SnapBi\Contracts\ConfigInterface;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Date;

/**
 * Signature Utilities
 * 
 * Provides methods for creating and verifying signatures
 * - Auth: B2B Access Token (Asymmetric RSA SHA256)
 * - Service: Virtual Account endpoints (Symmetric HMAC SHA512)
 */
class Signature
{
    protected ?ConfigInterface $config = null;

    public function __construct(?ConfigInterface $config = null)
    {
        $this->config = $config;
    }

    /**
     * Get Auth signature utilities (B2B Access Token - Asymmetric)
     * 
     * @return Signature\Auth
     */
    public function auth(): Signature\Auth
    {
        return new Signature\Auth($this->config);
    }

    /**
     * Get Service signature utilities (Virtual Account - Symmetric)
     * 
     * @return Signature\Service
     */
    public function service(): Signature\Service
    {
        return new Signature\Service($this->config);
    }
}

