@onyx-p/imlib-web 2.3.1 → 2.3.2

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.
package/index.esm.js CHANGED
@@ -21189,7 +21189,7 @@ class MessageCache {
21189
21189
  if (!content) return '';
21190
21190
  try {
21191
21191
  const contentStr = JSON.stringify(content);
21192
- return contentStr;
21192
+ return aes256Encrypt(contentStr, this.encryptKey);
21193
21193
  } catch (error) {
21194
21194
  logger.error('加密消息内容失败', error);
21195
21195
  return '';
@@ -21200,7 +21200,7 @@ class MessageCache {
21200
21200
  return null;
21201
21201
  }
21202
21202
  try {
21203
- const decryptedStr = encryptedHex;
21203
+ const decryptedStr = aes256Decrypt(encryptedHex, this.encryptKey);
21204
21204
  return JSON.parse(decryptedStr);
21205
21205
  } catch (error) {
21206
21206
  logger.error('解密消息内容失败', error);
package/index.umd.js CHANGED
@@ -21195,7 +21195,7 @@
21195
21195
  if (!content) return '';
21196
21196
  try {
21197
21197
  const contentStr = JSON.stringify(content);
21198
- return contentStr;
21198
+ return aes256Encrypt(contentStr, this.encryptKey);
21199
21199
  } catch (error) {
21200
21200
  logger.error('加密消息内容失败', error);
21201
21201
  return '';
@@ -21206,7 +21206,7 @@
21206
21206
  return null;
21207
21207
  }
21208
21208
  try {
21209
- const decryptedStr = encryptedHex;
21209
+ const decryptedStr = aes256Decrypt(encryptedHex, this.encryptKey);
21210
21210
  return JSON.parse(decryptedStr);
21211
21211
  } catch (error) {
21212
21212
  logger.error('解密消息内容失败', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onyx-p/imlib-web",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
6
  "types": "types/index.d.ts",