/** * Content Security Policy helpers. * * @module bquery/security */ /** * Generate a nonce for inline scripts/styles. * Use with Content-Security-Policy nonce directives. * * @param length - Nonce length in bytes (default: 16, max: 1024) * @returns Cryptographically random nonce string * @throws {Error} If crypto.getRandomValues or btoa are not available * @throws {RangeError} If length is invalid (negative, non-integer, or exceeds maximum) */ export declare const generateNonce: (length?: number) => string; /** * Check if a CSP header is present with specific directive. * Useful for feature detection and fallback strategies. * * @param directive - The CSP directive to check (e.g., 'script-src') * @returns True if the directive appears to be enforced */ export declare const hasCSPDirective: (directive: string) => boolean; //# sourceMappingURL=csp.d.ts.map