claudeunmask 1.0.9 → 1.0.11

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.
Files changed (2) hide show
  1. package/index.js +4 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* v 1.0.9 */
1
+ /* v 1.0.11 */
2
2
  function getMessageEncoding(message) {
3
3
  return new TextEncoder().encode(message);
4
4
  }
@@ -61,8 +61,7 @@
61
61
  var retVal = [];
62
62
  var enc = new TextEncoder();
63
63
  var [password, salt, theIV] = decryptionKey.split("-");
64
- // const password = "a-strong-password-123";
65
- console.log ("split:", password, salt, theIV);
64
+
66
65
  for (const curRec of inData) {
67
66
  var tmpRec = {}
68
67
  for (const [key, value] of Object.entries(curRec)) {
@@ -71,11 +70,9 @@ console.log ("split:", password, salt, theIV);
71
70
  if (value.includes("m$k_")) {
72
71
  const tmpData = curRec.secret_column.replace ("m$k_", "");
73
72
  const theData = base64ToBytes(tmpData.split('-')[0]);
74
- // const theIV = base64ToBytes(tmpData.split('-')[1]);
75
- // const salt = base64ToBytes(tmpData.split('-')[2]);
76
- const encryptionKey = await deriveKeyFromPassword(password, salt);
73
+ const encryptionKey = await deriveKeyFromPassword(password, base64ToBytes(salt));
77
74
 
78
- tmpRec[key] = await decryptThisData (theData, encryptionKey, theIV);
75
+ tmpRec[key] = await decryptThisData (theData, encryptionKey, base64ToBytes(theIV));
79
76
  } else {
80
77
  tmpRec[key] = value;
81
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudeunmask",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "claude unmask test",
5
5
  "main": "index.js",
6
6
  "scripts": {