ywana-core8 0.0.600 → 0.0.601

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.600",
3
+ "version": "0.0.601",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -220,7 +220,7 @@ const TableSelector = (props) => {
220
220
  .filter(key => schema[key].selectorColumn === true)
221
221
  .map(key => {
222
222
  const field = schema[key]
223
- return { id: field.id, label: field.label }
223
+ return { id: field.id, label: field.label, type: field.type }
224
224
  })
225
225
 
226
226
  const rows = all.filter(item => checked.has(item.id))
@@ -11,22 +11,34 @@ const Token = () => {
11
11
 
12
12
  function decryptData(encrypted, secret) {
13
13
  const bytes = CryptoJS.AES.decrypt(encrypted, secret);
14
+ const iv = CryptoJS
14
15
  const originalText = bytes.toString(CryptoJS.enc.Utf8);
15
16
  return originalText;
16
17
  }
17
18
 
18
19
  function encryptData(message, secret) {
19
- return CryptoJS.AES.encrypt(message, secret).toString();
20
+ return CryptoJS.AES.encrypt(message, secret);
20
21
  }
21
22
 
22
23
  function change(id, value) {
23
- const secret = 'BCDF956E21C79A36';
24
+ const secret = 'n2r5u8x/A?D(G+KbPeShVkYp3s6v9y$B';
24
25
  const e = encryptData(value, secret)
25
26
  setEncrypted(e)
26
27
  const d = decryptData(e, secret)
27
28
  setDecrypted(d)
28
29
  }
29
30
 
31
+ var data = "MTIzNDU2Nzg5MDEyMzQ1Nh7Dao5sQ/PxjeIQHSeTsjM="
32
+ const key = CryptoJS.enc.Utf8.parse('n2r5u8x/A?D(G+KbPeShVkYp3s6v9y$B')
33
+ const rawData = atob(data)
34
+ console.log(rawData)
35
+ const iv = CryptoJS.enc.Utf8.parse(rawData.substring(0, 16))
36
+ const enc = btoa(rawData.substring(16))
37
+ const dec = CryptoJS.AES.decrypt(enc, key, {iv: iv})
38
+ const plaintext = dec.toString(CryptoJS.enc.Utf8)
39
+ console.log(plaintext)
40
+
41
+
30
42
  return (
31
43
  <>
32
44
  <TextField label="Text" onChange={(id, value) => change(id, value)}></TextField>