import CryptoJS from 'crypto-js';

/**
 * AES加密
 * @param key 加密的key
 * @param data 需要加密的字符串
 * @returns encrypted 加密的字符串
 */
declare function encrypt(key: string | CryptoJS.lib.WordArray, data: string | CryptoJS.lib.WordArray): string;
/**
 * AES 解密
 * @param key 解密的key 需要和加密的key 一致
 * @param encrypted 加密后字符串
 * @returns data  解密后的字符串
 */
declare function decrypt(key: string | CryptoJS.lib.WordArray, encrypted: string | CryptoJS.lib.CipherParams): string;
/**
 * 获取storage
 * @returns storage
 */
declare function getStorage(key: string): string;
/**
 * 设置storage
 * @returns storage
 */
declare function setStorage(key: string, data: any): string;
/**
 * 移除storage
 */
declare function removeStorage(key: string): void;
/**
 * 获取token  带AES解密
 * @returns token
 */
declare function getToken(key: string): string;
/**
 * 设置token  带AES加密
 * @returns token
 */
declare function setToken(key: string, token: string): string;
/**
 * 移除token
 */
declare function removeToken(key: string): void;

export { decrypt, encrypt, getStorage, getToken, removeStorage, removeToken, setStorage, setToken };
