UNPKG

nehonix-uri-processor

Version:

A powerful URI processor for encoding, decoding, and analyzing URI data securely.

151 lines 4.3 kB
/** * Shared utility methods for encoding detection and basic decoding operations */ declare class NehonixCommonUtils { /** * Checks if the string contains hexadecimal encoding */ static hasHexEncoding(input: string): boolean; /** * Checks if the string contains Unicode encoding */ static hasUnicodeEncoding(input: string): boolean; /** * Checks if the string contains HTML entities */ static hasHTMLEntityEncoding(input: string): boolean; /** * Checks if the string contains punycode */ static hasPunycode(input: string): boolean; /** * Checks if the string contains percent encoding (%) */ static hasPercentEncoding(input: string): boolean; /** * Checks if the string contains double percent encoding (%%XX) */ static hasDoublePercentEncoding(input: string): boolean; /** * Decodes raw hexadecimal string (without prefixes) */ static drwp(hexString: string): string; /** * Basic Base64 decoding */ /** * Decodes base64 encoding */ static decodeB64(input: string): string; /** * Enhanced encoding detection methods to accurately detect various encoding types */ /** * Checks if a string is likely to be plain text * @param s The string to check */ static isPlainText(s: string): boolean; /** * Enhanced ROT13 detection that avoids false positives * @param s The string to check */ static isRot13(s: string): boolean; /** * Improved Base64 detection * @param s The string to check */ static isBase64(input: string): boolean; static decodeBase64(input: string): string; /** * Base32 detection * @param s The string to check */ static isBase32(s: string): boolean; /** * Improved URL-safe Base64 detection * @param s The string to check */ static isUrlSafeBase64(s: string): boolean; /** * Improved percent encoding detection * @param s The string to check */ static isPercentEncoding(s: string): boolean; /** * Improved double percent encoding detection * @param s The string to check */ static isDoublePercent(s: string): boolean; /** * Improved hexadecimal encoding detection * @param s The string to check */ static isHex(s: string): boolean; /** * Improved raw hexadecimal string detection * @param s The string to check */ /** * Improved raw hexadecimal string detection * @param s The string to check */ static hasRawHexString(s: string): boolean; /** * Improved ASCII Hex detection * @param s The string to check */ static isAsciiHex(s: string): boolean; /** * Improved ASCII Octal detection * @param s The string to check */ static isAsciiOct(s: string): boolean; /** * Improved Unicode escape detection * @param s The string to check */ static isUnicode(s: string): boolean; /** * Improved HTML entity detection * @param s The string to check */ static isHtmlEntity(s: string): boolean; /** * Improved decimal HTML entity detection * @param s The string to check */ static isDecimalHtmlEntity(s: string): boolean; /** * Improved quoted-printable detection * @param s The string to check */ static isQuotedPrintable(s: string): boolean; /** * Improved Punycode detection * @param s The string to check */ static isPunycode(s: string): boolean; /** * Improved JWT format detection * @param s The string to check */ static hasJWTFormat(s: string): boolean; /** * Improved UTF-7 detection * @param s The string to check */ static isUtf7(s: string): boolean; /** * Improved JavaScript escape sequence detection * @param s The string to check */ static isJsEscape(s: string): boolean; /** * Improved CSS escape sequence detection * @param s The string to check */ static isCssEscape(s: string): boolean; } export { NehonixCommonUtils as NehonixSharedUtils }; export default NehonixCommonUtils; //# sourceMappingURL=NehonixCommonUtils.d.ts.map