UNPKG

xypriss-security

Version:

Advanced High-Performance Security Framework. Military-grade encryption, post-quantum resilience, and fortified data structures.

54 lines 2.03 kB
/*************************************************************************** * XyPriss Security Core - Main Class ****************************************************************************/ import { APIKeyOptions } from "../types"; /** * ### XyPrissSecurity Main Class * * The primary interface for the XyPriss Security framework. */ export declare class XyPrissSecurity { /** * Generates a secure API key with a prefix and timestamp for management. * * @param options - Configuration for the API key format and length. * @returns A structured, cryptographically strong API key. */ static generateAPIKey(options?: APIKeyOptions): string; /** * Performs an environment security check to ensure integrity. */ static verifyRuntimeSecurity(): boolean; /** * Returns the actual byte length of a string (UTF-8 encoded). * Useful for strict buffer checks where character count differs from byte count. * * @param str - The string to measure. * @returns The number of bytes in the string. */ static getByteLength(str: string): number; /** * Verifies if a string has exactly the expected byte length. * * @param str - The string to check. * @param expectedLength - The expected number of bytes. * @returns True if the string byte length matches expectedLength. */ static isValidByteLength(str: string, expectedLength: number): boolean; } /** * Verifies if a string has exactly the expected byte length (UTF-8). * * @param str - The string to check. * @param length - The expected number of bytes. * @returns True if the byte length matches, false otherwise. */ export declare const isValidByteLength: typeof XyPrissSecurity.isValidByteLength; /** * Returns the actual byte length of a string (UTF-8). * * @param str - The string to measure. * @returns The number of bytes. */ export declare const getByteLength: typeof XyPrissSecurity.getByteLength; //# sourceMappingURL=XyPrissSecurity.d.ts.map