mixlea-utils-js 0.1.30 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -274,11 +274,11 @@ declare interface CommonEvent_2 {
274
274
  export declare function compareSetDifference<T>(setA: Set<T>, setB: Set<T>): Set<T>;
275
275
 
276
276
  /**
277
- * 异步压缩文本为 base64 字符串,适合存数据库
277
+ * 异步压缩文本并编码为 Base64,方便存数据库
278
+ * @param input 明文字符串
279
+ * @returns Base64 压缩字符串
278
280
  */
279
- export declare function compressData(input: any, opts?: {
280
- encryptKey: string;
281
- }): Promise<string>;
281
+ export declare function compressData(input: string): Promise<string>;
282
282
 
283
283
  declare type ConfigStore = Record<string, any>;
284
284
 
@@ -347,16 +347,16 @@ declare interface DebouncedFunc<T extends (...args: any[]) => any> {
347
347
  }
348
348
 
349
349
  /**
350
- * 异步从 base64 解压为原始文本
350
+ * 异步从 Base64 解码并解压为原始文本
351
+ * @param base64 Base64 压缩字符串
352
+ * @returns 明文字符串
351
353
  */
352
- export declare function decompressData(base64: string, opts?: {
353
- encryptKey: string;
354
- }): Promise<string>;
354
+ export declare function decompressData(base64: string): Promise<string>;
355
355
 
356
356
  /**
357
- * 简单解密函数
358
- * @param {string} encrypted - 加密后的字符串(base64)
359
- * @param {string} pwd - 解密密码
357
+ * XOR 解密(稳定输出原始内容)
358
+ * @param {string} encrypted - Base64 加密字符串
359
+ * @param {string} pwd - 密码
360
360
  * @returns {string} 解密后的原始字符串
361
361
  */
362
362
  export declare function decrypt(encrypted: string, pwd: string): string;
@@ -424,10 +424,10 @@ export declare function emptyCoalescing(...params: any[]): any;
424
424
  export declare function emptyFunction(): void;
425
425
 
426
426
  /**
427
- * 简单加密函数 (基于密码的XOR加密 - 仅用于简单场景,不适用于高安全性需求)
427
+ * XOR 加密(支持 Unicode,解密稳定)
428
428
  * @param {string} input - 要加密的字符串
429
- * @param {string} pwd - 加密密码
430
- * @returns {string} 加密后的16进制字符串
429
+ * @param {string} pwd - 密码
430
+ * @returns {string} Base64 加密结果
431
431
  */
432
432
  export declare function encrypt(input: string, pwd: string): string;
433
433
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mixlea-utils-js",
3
3
  "type": "module",
4
- "version": "0.1.30",
4
+ "version": "0.1.32",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",
7
7
  "exports": {