/**************************************************** * Audit Information Platform Component * 提供加解密算法支持 * 2020-08 * Sunny ****************************************************/ import * as LZUTF8 from "lzutf8"; /** * 加密解密函数对象 */ declare const Codec: { /** * 对字符串数据进行加密 * @function * * @param {string} str 要加密的字符串 * @param {string} token 可以理解为钥匙 * @returns {string} 加密后的字符串 */ enc: (str: string, token: string) => string; /** * 对字符串数据进行解密 * @function * * @param {string} str 要解密的字符串 * @param {string} token 可以理解为钥匙 * @returns {string} 解密后的字符串 */ dec: (str: string, token: string) => string; /** * 对字符串数据进行LZ 压缩 * @function * * @param {string} input 要压缩的字符串 * @param {LZUTF8.CompressionOptions} options 请使用: Codec.OUTPUT_PROP(string) * @returns {string} 压缩后的字符串 */ LZC: typeof LZUTF8.compress; /** * 对字符串数据进行LZ 解压缩 * @function * * @param {string} input 要解压缩的字符串 * @param {LZUTF8.DecompressionOptions } options 请使用 Codec.INPUT_PROP(base64) * @returns {string} 解压缩后的字符串 */ LZD: typeof LZUTF8.decompress; INPUT_PROP: LZUTF8.DecompressionOptions; OUTPUT_PROP: LZUTF8.CompressionOptions; COM_PROP: LZUTF8.CompressionOptions; DECOM_PROP: LZUTF8.DecompressionOptions; }; export default Codec;