UNPKG

@mamba-le/auth

Version:
43 lines (42 loc) 1.14 kB
/// <reference types="crypto-js" /> /** * @author 冷 (https://github.com/LengYXin) * @email lengyingxin8966@gmail.com * @create date 2021-08-23 11:23:50 * @modify date 2021-08-23 11:23:50 * @desc [算法] */ import type Bowser from 'bowser'; export declare class AuthEncryption { /** @type AES_Key 秘钥 当前日期 */ static readonly AES_Config: { AES_Key: CryptoJS.lib.WordArray; AES_IV: CryptoJS.lib.WordArray; set(SystemInfo: { /** 微信 版本 */ version?: string; /** 系统信息 */ system?: string; /** 小程序APPID */ appId?: string; /** 浏览器 userAgent */ userAgent?: string; } & Partial<Bowser.Parser.ParsedResult>): void; }; /** * 加密 * @static * @param {string} message * @return {*} * @memberof Encryption */ static AES_Encrypt(message: string): string; /** * 解密 * @static * @param {string} message * @return {*} * @memberof Encryption */ static AES_Decrypt(message: string): string; }