pixel-react 1.15.28 → 1.15.30
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/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/assets/icons/fail_result_icon.svg.js +6 -0
- package/lib/assets/icons/fail_result_icon.svg.js.map +1 -0
- package/lib/assets/icons/pass_result_icon.svg.js +6 -0
- package/lib/assets/icons/pass_result_icon.svg.js.map +1 -0
- package/lib/assets/icons/separator_icon.svg.js +6 -0
- package/lib/assets/icons/separator_icon.svg.js.map +1 -0
- package/lib/assets/icons/skipped_result_icon.svg.js +6 -0
- package/lib/assets/icons/skipped_result_icon.svg.js.map +1 -0
- package/lib/assets/icons/warning_result_icon.svg.js +6 -0
- package/lib/assets/icons/warning_result_icon.svg.js.map +1 -0
- package/lib/components/CreateVariable/CreateVariableSlider.js +1 -1
- package/lib/components/CreateVariable/CreateVariableSlider.js.map +1 -1
- package/lib/components/Icon/iconList.js +10 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/index.cjs +29 -10
- package/lib/index.cjs.map +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.js +13 -10
- package/lib/utils/getEncryptedData/getEncryptedData.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import forge from 'node-forge';
|
|
2
|
-
|
|
3
1
|
async function getEncryptedData(data, base64PublicKey) {
|
|
4
2
|
// Decode the base64-encoded public key
|
|
5
|
-
const
|
|
6
|
-
//
|
|
7
|
-
const publicKey =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
const keyBytes = Uint8Array.from(atob(base64PublicKey), c => c.charCodeAt(0));
|
|
4
|
+
// Import the public key in SPKI format
|
|
5
|
+
const publicKey = await crypto.subtle.importKey('spki', keyBytes, {
|
|
6
|
+
name: 'RSA-OAEP',
|
|
7
|
+
hash: 'SHA-256'
|
|
8
|
+
}, false, ['encrypt']);
|
|
9
|
+
// Convert data to Uint8Array
|
|
10
|
+
const encodedData = new TextEncoder().encode(data);
|
|
11
|
+
// Encrypt the data using RSA-OAEP
|
|
12
|
+
const encryptedData = await crypto.subtle.encrypt({
|
|
13
|
+
name: 'RSA-OAEP'
|
|
14
|
+
}, publicKey, encodedData);
|
|
12
15
|
// Convert encrypted data to base64
|
|
13
|
-
return
|
|
16
|
+
return btoa(String.fromCharCode(...new Uint8Array(encryptedData)));
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
export { getEncryptedData };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEncryptedData.js","sources":["../../../src/utils/getEncryptedData/getEncryptedData.ts"],"sourcesContent":[null],"names":["getEncryptedData","data","base64PublicKey","
|
|
1
|
+
{"version":3,"file":"getEncryptedData.js","sources":["../../../src/utils/getEncryptedData/getEncryptedData.ts"],"sourcesContent":[null],"names":["getEncryptedData","data","base64PublicKey","keyBytes","Uint8Array","from","atob","c","charCodeAt","publicKey","crypto","subtle","importKey","name","hash","encodedData","TextEncoder","encode","encryptedData","encrypt","btoa","String","fromCharCode"],"mappings":"AAAO,eAAeA,gBAAgBA,CAACC,IAAY,EAAEC,eAAuB,EAAA;AAC1E;AACA,EAAA,MAAMC,QAAQ,GAAGC,UAAU,CAACC,IAAI,CAACC,IAAI,CAACJ,eAAe,CAAC,EAAEK,CAAC,IAAIA,CAAC,CAACC,UAAU,CAAC,CAAC,CAAC,CAAC;AAE7E;AACA,EAAA,MAAMC,SAAS,GAAG,MAAMC,MAAM,CAACC,MAAM,CAACC,SAAS,CAC7C,MAAM,EACNT,QAAQ,EACR;AACEU,IAAAA,IAAI,EAAE,UAAU;AAChBC,IAAAA,IAAI,EAAE;AACP,GAAA,EACD,KAAK,EACL,CAAC,SAAS,CAAC,CACZ;AAED;EACA,MAAMC,WAAW,GAAG,IAAIC,WAAW,EAAE,CAACC,MAAM,CAAChB,IAAI,CAAC;AAElD;EACA,MAAMiB,aAAa,GAAG,MAAMR,MAAM,CAACC,MAAM,CAACQ,OAAO,CAC/C;AACEN,IAAAA,IAAI,EAAE;AACP,GAAA,EACDJ,SAAS,EACTM,WAAW,CACZ;AAED;AACA,EAAA,OAAOK,IAAI,CAACC,MAAM,CAACC,YAAY,CAAC,GAAG,IAAIlB,UAAU,CAACc,aAAa,CAAC,CAAC,CAAC;AACpE;;;;"}
|
package/package.json
CHANGED