<?php

declare(strict_types=1);

namespace App\Framework\Database;

use App\Framework\Random\RandomGenerator;

final readonly class SimpleIdGenerator
{
    public function __construct(
        private RandomGenerator $random
    ) {
    }

    /**
     * Generate a new database ID.
     *
     * @return string 32-character hexadecimal database ID
     */
    public function generate(): string
    {
        return bin2hex($this->random->bytes(16));
    }
}
