Files
musadaq-saas/app/core/Security.php
2026-05-03 20:33:29 +03:00

22 lines
380 B
PHP

<?php
/**
* Simple Security Helpers
*/
declare(strict_types=1);
namespace App\Core;
final class Security
{
public static function sanitize(string $data): string
{
return htmlspecialchars(strip_tags(trim($data)));
}
public static function generateRandomString(int $length = 32): string
{
return bin2hex(random_bytes($length / 2));
}
}