UNPKG

restifyx.js

Version:

Advanced API endpoint handler system with automatic documentation

19 lines (18 loc) 948 B
import type { Request, Response, NextFunction } from "express"; export declare function generateSecureToken(length?: number): string; export declare function hashString(data: string, algorithm?: string): string; export declare function generateCsrfToken(): string; export declare function csrfProtection(options?: { cookieName?: string; headerName?: string; ignoreMethods?: string[]; errorHandler?: (req: Request, res: Response) => void; }): (req: Request, res: Response, next: NextFunction) => void; export declare function securityHeaders(): (req: Request, res: Response, next: NextFunction) => void; export declare function encryptData(data: string, key: string, iv?: Buffer): { encrypted: string; iv: string; }; export declare function decryptData(encryptedData: string, key: string, iv: string): string; export declare function generateJwtSecret(): string; export declare function sanitizeInput(input: string): string;