nehonix-uri-processor
Version:
A powerful URI processor for encoding, decoding, and analyzing URI data securely.
118 lines • 3.84 kB
TypeScript
import { ENC_TYPE } from "../types";
import { NestedEncodingOptions, NestedEncodingResponse } from "../types/enc.type";
declare class NES {
/**
* Encodes a string according to a specific encoding type
* @param input The string to encode
* @param encodingType The encoding type to use
* @returns The encoded string
*/
static encode(input: string, encodingType: ENC_TYPE): string;
/**
* Encodes with percent encoding (URL)
*/
static encodePercentEncoding(input: string, encodeSpaces?: boolean): string;
/**
* Encodes with double percent encoding
*/
static encodeDoublePercentEncoding(input: string): string;
/**
* Encodes in base64
*/
static encodeBase64(input: string): string;
/**
* Encodes in hexadecimal (format \xXX)
*/
static encodeHex(input: string): string;
/**
* Encodes in Unicode (format \uXXXX)
*/
static encodeUnicode(input: string): string;
/**
* Encodes HTML entities in a string
*/
static encodeHTMLEntities(input: string): string;
/**
* Encodes in punycode
*/
static encodePunycode(input: string): string;
/**
* Encodes in ASCII with hexadecimal representation
*/
static encodeASCIIWithHex(input: string): string;
/**
* Encodes in ASCII with octal representation
*/
static encodeASCIIWithOct(input: string): string;
/**
* Encodes all characters in percent encoding
*/
static encodeAllChars(input: string): string;
/**
* Calculates confidence level for base64 encoding
*/
static calculateBase64Confidence(input: string): number;
/**
* Encodes using ROT13 cipher
*/
static encodeROT13(input: string): string;
/**
* Encodes in Base32
*/
static encodeBase32(input: string): string;
/**
* Encodes in URL-safe Base64
*/
static encodeURLSafeBase64(input: string): string;
/**
* Encodes string with JavaScript escape sequences
*/
static encodeJavaScriptEscape(input: string): string;
/**
* Encodes string with CSS escape sequences
*/
static encodeCSSEscape(input: string): string;
/**
* Encodes in UTF-7
*/
static encodeUTF7(input: string): string;
/**
* Encodes in Quoted-Printable
*/
static encodeQuotedPrintable(input: string): string;
/**
* Encodes in decimal HTML entity format
*/
static encodeDecimalHTMLEntities(input: string): string;
/**
* Encodes in raw hexadecimal (no prefixes)
*/
static encodeRawHex(input: string): string;
/**
* Encodes as a JWT with the input as the payload
*/
static encodeJWT(input: string): string;
/**
* Encodes as a URL (percent-encoding with spaces as %20)
*/
static encodeUrl(input: string): string;
/**
* Performs multiple encodings on an input string synchronously
* @param input The string to encode
* @param types Array of encoding types to apply
* @param options Configuration options for nested encoding
* @returns Object containing encoding results
*/
static encodeMultiple(input: string, types: ENC_TYPE[], options?: NestedEncodingOptions): NestedEncodingResponse;
/**
* Performs multiple encodings on an input string asynchronously
* @param input The string to encode
* @param types Array of encoding types to apply
* @param options Configuration options for nested encoding
* @returns Promise resolving to object containing encoding results
*/
static encodeMultipleAsync(input: string, types: ENC_TYPE[], options?: NestedEncodingOptions): Promise<NestedEncodingResponse>;
}
export { NES as NehonixEncService };
export default NES;
//# sourceMappingURL=NehonixEnc.service.d.ts.map