Files
oops-plugin-framework/assets/core/utils/EncryptUtil.ts
dgflash a8c3a1b7f4 1. CCEntity.addPrefab方法修改为返回节点
2. TimeUtili添加将秒数格式化为时间格式
3. 修复时间管理从后台恢复时计算错误问题
4. 修复DateExt时间格式化转化错误问题
5. 修复StorageSecuritySimple在真机上解码错误问题
6. 修复音效循环播放功能无效问题
7. 优化加载模块
8. 优化CCEntity.addUi错误提示信息
9. CommonPrompt对象修改为PromptBase,并优化代码,适合继承使用
2025-10-26 21:30:12 +08:00

55 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// import { AES, MD5, Utf8, WordArray } from 'crypto-es';
// /**
// * CryptoES 加密库封装
// * https://github.com/entronad/crypto-es
// *
// * 安装第三方库生效
// * npm install -g yarn
// * yarn add crypto-es
// */
// export class EncryptUtil {
// // 将key和iv存储为WordArray类型这是CryptoES库需要的格式
// private static key: WordArray;
// private static iv: WordArray;
// /**
// * MD5加密
// * @param msg 加密信息
// */
// static md5(msg: string): string {
// return MD5(msg).toString();
// }
// /** 初始化加密库 */
// static initCrypto(key: string, iv: string) {
// this.key = Utf8.parse(key);
// this.iv = Utf8.parse(iv);
// }
// /**
// * AES 加密
// * @param msg 待加密的明文
// */
// static aesEncrypt(msg: string): string {
// const encrypted = AES.encrypt(msg, this.key, {
// iv: this.iv
// });
// // 返回Base64格式的密文字符串
// return encrypted.toString();
// }
// /**
// * AES 解密
// * @param cipherText 待解密的密文
// */
// static aesDecrypt(cipherText: string): string {
// const decrypted = AES.decrypt(cipherText, this.key, {
// iv: this.iv
// });
// // 将解密结果从WordArray转换为UTF-8字符串
// return decrypted.toString(Utf8);
// }
// }