- Add comprehensive error handling system with custom error pages - Implement professional enterprise-style design with Tailwind CSS - Create modular HMVC architecture with clean separation of concerns - Add security features: CSRF protection, XSS filtering, Argon2ID hashing - Include CLI tools for development workflow - Add error reporting dashboard with system monitoring - Implement responsive design with consistent slate color scheme - Replace all emoji icons with professional SVG icons - Add comprehensive test suite with PHPUnit - Include database migrations and seeders - Add proper exception handling with fallback pages - Implement template engine with custom syntax support - Add helper functions and facades for clean code - Include proper logging and debugging capabilities
75 lines
1.5 KiB
PHP
75 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Core\Facades;
|
|
|
|
/**
|
|
* NovaCore Security Facade
|
|
* Static access to security services
|
|
*/
|
|
class Security
|
|
{
|
|
/**
|
|
* Get security instance
|
|
*/
|
|
public static function instance(): \App\Core\Security
|
|
{
|
|
return app('security');
|
|
}
|
|
|
|
/**
|
|
* Generate CSRF token
|
|
*/
|
|
public static function generateCsrfToken(): string
|
|
{
|
|
return self::instance()->generateCsrfToken();
|
|
}
|
|
|
|
/**
|
|
* Verify CSRF token
|
|
*/
|
|
public static function verifyCsrfToken(string $token): bool
|
|
{
|
|
return self::instance()->verifyCsrfToken($token);
|
|
}
|
|
|
|
/**
|
|
* Sanitize string input
|
|
*/
|
|
public static function sanitizeString(string $input): string
|
|
{
|
|
return self::instance()->sanitizeString($input);
|
|
}
|
|
|
|
/**
|
|
* Encrypt data
|
|
*/
|
|
public static function encrypt(string $data): string
|
|
{
|
|
return self::instance()->encrypt($data);
|
|
}
|
|
|
|
/**
|
|
* Decrypt data
|
|
*/
|
|
public static function decrypt(string $encryptedData): string
|
|
{
|
|
return self::instance()->decrypt($encryptedData);
|
|
}
|
|
|
|
/**
|
|
* Hash password
|
|
*/
|
|
public static function hashPassword(string $password): string
|
|
{
|
|
return self::instance()->hashPassword($password);
|
|
}
|
|
|
|
/**
|
|
* Verify password
|
|
*/
|
|
public static function verifyPassword(string $password, string $hash): bool
|
|
{
|
|
return self::instance()->verifyPassword($password, $hash);
|
|
}
|
|
}
|