UNPKG

xypriss-security

Version:

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

45 lines 1.65 kB
/*************************************************************************** * XyPriss Security Core - SecureBuffer * * An enhanced Uint8Array that provides familiar encoding methods * similar to Node.js Buffer, optimized for security operations. * * @author NEHONIX (Nehonix-Team - https://github.com/Nehonix-Team) * @license Nehonix Open Source License (NOSL) ****************************************************************************/ import { __strl__ } from "strulink"; type localEncodings = "utf-8" | "hex" | "base64" | "binary" | "utf8"; /** * ### SecureBuffer * * A specialized version of Uint8Array that includes high-performance * encoding utilities. It maintains compatibility with standard Uint8Array * while adding the flexibility of Node-style Buffers. */ export declare class SecureBuffer extends Uint8Array { /** * Convert the buffer to a string with the specified encoding. * * @param encoding - The target encoding ('hex', 'base64', 'utf8', 'binary'). * @returns The encoded string. */ toString(encoding?: Parameters<typeof __strl__.encode>[1] | localEncodings): string; /** * Alias for toBuffer() to maintain compatibility with older XyPriss versions. */ getBuffer(): Buffer; /** * Returns a standard Node.js Buffer representation. */ toBuffer(): Buffer; /** * Returns a clean Uint8Array (stripping XyPriss enhancements). */ toUint8Array(): Uint8Array; /** * Slice with SecureBuffer return type. */ slice(start?: number, end?: number): SecureBuffer; } export {}; //# sourceMappingURL=SecureBuffer.d.ts.map