@bitpatty/imgproxy-url-builder
Version:
A TypeScript helper library for building imgproxy URLs
25 lines (24 loc) • 688 B
TypeScript
/**
* UTF-8 encodes the specified message
*
* @param msg The message
* @returns The encoded message as a Uint8Array of bytes
*/
declare const utf8encode: (msg: string) => Uint8Array;
/**
* Parses a string containing hex characters
* into an array of bytes
*
* @param str The string
* @returns The Uint8Array of parsed bytes
*/
declare const parseHexString: (str: string) => Uint8Array;
/**
* Encodes the specified array of bytes to
* its base64url representation
*
* @param bytes The Uint8Array of bytes
* @returns The base64url string
*/
declare const base64urlEncode: (bytes: Uint8Array) => string;
export { utf8encode, base64urlEncode, parseHexString };