@newdash/newdash
Version:
javascript/typescript utility library
28 lines (27 loc) • 823 B
TypeScript
/**
* Calculates MD5 value for a given string.
* If a key is provided, calculates the HMAC-MD5 value.
* Returns a Hex encoded string unless the raw argument is given.
*
* @since 5.15.0
* @category String
* @param {string} input Input string
* @param {string} [key] HMAC key
* @param {boolean} [raw] Raw output switch
* @returns {string} MD5 output
*/
export declare function md5(input: string): string;
/**
* Calculates MD5 value for a given string.
* If a key is provided, calculates the HMAC-MD5 value.
* Returns a Hex encoded string unless the raw argument is given.
*
* @since 5.15.0
* @category String
* @param input Input string
* @param key HMAC key
* @param raw Raw output switch
* @returns MD5 output (in upper case)
*/
export declare function MD5(input: string): string;
export default md5;