pixel-react 1.15.20 → 1.15.22

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 (62) hide show
  1. package/lib/_virtual/index11.js +2 -2
  2. package/lib/_virtual/index9.js +2 -2
  3. package/lib/assets/icons/exasure_loader.svg.js +6 -0
  4. package/lib/assets/icons/exasure_loader.svg.js.map +1 -0
  5. package/lib/assets/icons/exasure_logo_name.svg.js +6 -0
  6. package/lib/assets/icons/exasure_logo_name.svg.js.map +1 -0
  7. package/lib/components/Icon/iconList.js +4 -0
  8. package/lib/components/Icon/iconList.js.map +1 -1
  9. package/lib/components/MultiSelect/MultiSelect.js +9 -10
  10. package/lib/components/MultiSelect/MultiSelect.js.map +1 -1
  11. package/lib/components/SessionDropdown/SessionDropdown.js +4 -2
  12. package/lib/components/SessionDropdown/SessionDropdown.js.map +1 -1
  13. package/lib/components/SessionManager/SessionManager.js +4 -3
  14. package/lib/components/SessionManager/SessionManager.js.map +1 -1
  15. package/lib/components/SessionManager/types.d.ts +1 -0
  16. package/lib/index.cjs +5591 -35
  17. package/lib/index.cjs.map +1 -1
  18. package/lib/index.d.ts +2 -1
  19. package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
  20. package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
  21. package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
  22. package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
  23. package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
  24. package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
  25. package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
  26. package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
  27. package/lib/node_modules/jsencrypt/lib/JSEncrypt.js +246 -0
  28. package/lib/node_modules/jsencrypt/lib/JSEncrypt.js.map +1 -0
  29. package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +325 -0
  30. package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js.map +1 -0
  31. package/lib/node_modules/jsencrypt/lib/index.js +6 -0
  32. package/lib/node_modules/jsencrypt/lib/index.js.map +1 -0
  33. package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +570 -0
  34. package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js.map +1 -0
  35. package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js +88 -0
  36. package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js.map +1 -0
  37. package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js +66 -0
  38. package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js.map +1 -0
  39. package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js +87 -0
  40. package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js.map +1 -0
  41. package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js +65 -0
  42. package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js.map +1 -0
  43. package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +1700 -0
  44. package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js.map +1 -0
  45. package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +48 -0
  46. package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js.map +1 -0
  47. package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js +77 -0
  48. package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js.map +1 -0
  49. package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +415 -0
  50. package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js.map +1 -0
  51. package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js +307 -0
  52. package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js.map +1 -0
  53. package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js +61 -0
  54. package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js.map +1 -0
  55. package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +1559 -0
  56. package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js.map +1 -0
  57. package/lib/styles.css +1 -1
  58. package/lib/styles.css.map +1 -1
  59. package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -1
  60. package/lib/utils/getEncryptedData/getEncryptedData.js +8 -17
  61. package/lib/utils/getEncryptedData/getEncryptedData.js.map +1 -1
  62. package/package.json +2 -1
package/lib/index.d.ts CHANGED
@@ -4619,7 +4619,7 @@ declare const compareArrays: (arr1: unknown[], arr2: unknown[]) => boolean;
4619
4619
  type AnyObject = Record<string, unknown>;
4620
4620
  declare const compareObjects: (obj1: AnyObject | null, obj2: AnyObject | null) => boolean;
4621
4621
 
4622
- declare function getEncryptedData(data: string, base64PublicKey: string): Promise<string>;
4622
+ declare const getEncryptedData: (data: string, publicKey: string) => string | false;
4623
4623
 
4624
4624
  type Callback = (...args: any[]) => void;
4625
4625
  interface ThrottledFunction extends Function {
@@ -5608,6 +5608,7 @@ interface SessionManagerProps {
5608
5608
  icons?: string[];
5609
5609
  className?: string;
5610
5610
  disabledIcons?: string[];
5611
+ activeIcon?: string;
5611
5612
  }
5612
5613
 
5613
5614
  declare const SessionManager: React$1.ForwardRefExoticComponent<SessionManagerProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { __exports as beautifier } from '../../../../../_virtual/beautifier2.js';
1
+ import { __exports as beautifier } from '../../../../../_virtual/beautifier3.js';
2
2
  import { __require as requireOptions } from './options.js';
3
3
  import { __require as requireOutput } from '../core/output.js';
4
4
  import { __require as requireInputscanner } from '../core/inputscanner.js';
@@ -1,4 +1,4 @@
1
- import { __exports as beautifier } from '../../../../../_virtual/beautifier3.js';
1
+ import { __exports as beautifier } from '../../../../../_virtual/beautifier2.js';
2
2
  import { __require as requireOptions } from './options.js';
3
3
  import { __require as requireOutput } from '../core/output.js';
4
4
  import { __require as requireTokenizer } from './tokenizer.js';
@@ -1,4 +1,4 @@
1
- import { __module as html } from '../../../../../_virtual/index11.js';
1
+ import { __module as html } from '../../../../../_virtual/index9.js';
2
2
  import { __require as requireBeautifier } from './beautifier.js';
3
3
  import { __require as requireOptions } from './options.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as options } from '../../../../../_virtual/options3.js';
1
+ import { __exports as options } from '../../../../../_virtual/options.js';
2
2
  import { __require as requireOptions$1 } from '../core/options.js';
3
3
 
4
4
  /*jshint node:true */
@@ -1,4 +1,4 @@
1
- import { __exports as tokenizer } from '../../../../../_virtual/tokenizer2.js';
1
+ import { __exports as tokenizer } from '../../../../../_virtual/tokenizer.js';
2
2
  import { __require as requireTokenizer$1 } from '../core/tokenizer.js';
3
3
  import { __require as requireDirectives } from '../core/directives.js';
4
4
  import { __require as requireTemplatablepattern } from '../core/templatablepattern.js';
@@ -1,4 +1,4 @@
1
- import { __module as javascript } from '../../../../../_virtual/index9.js';
1
+ import { __module as javascript } from '../../../../../_virtual/index11.js';
2
2
  import { __require as requireBeautifier } from './beautifier.js';
3
3
  import { __require as requireOptions } from './options.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __exports as options } from '../../../../../_virtual/options.js';
1
+ import { __exports as options } from '../../../../../_virtual/options3.js';
2
2
  import { __require as requireOptions$1 } from '../core/options.js';
3
3
 
4
4
  /*jshint node:true */
@@ -1,4 +1,4 @@
1
- import { __exports as tokenizer } from '../../../../../_virtual/tokenizer.js';
1
+ import { __exports as tokenizer } from '../../../../../_virtual/tokenizer2.js';
2
2
  import { __require as requireInputscanner } from '../core/inputscanner.js';
3
3
  import { __require as requireTokenizer$1 } from '../core/tokenizer.js';
4
4
  import { __require as requireDirectives } from '../core/directives.js';
@@ -0,0 +1,246 @@
1
+ import { b64tohex, hex2b64 } from './lib/jsbn/base64.js';
2
+ import { JSEncryptRSAKey } from './JSEncryptRSAKey.js';
3
+ import { oaep_pad } from './lib/jsbn/rsa.js';
4
+ import { rstr2hex, rstr_sha256 } from './lib/jsbn/sha256.js';
5
+
6
+ var _a;
7
+ var version = typeof process !== "undefined" ? (_a = process.env) === null || _a === void 0 ? void 0 : _a.npm_package_version : undefined;
8
+ /**
9
+ *
10
+ * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour
11
+ * possible parameters are:
12
+ * - key {JSEncryptRSAKey} default: null
13
+ * - default_key_size {number} default: 1024 the key size in bit
14
+ * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent
15
+ * - log {boolean} default: false whether log warn/error or not
16
+ * @constructor
17
+ */
18
+ var JSEncrypt = /** @class */function () {
19
+ function JSEncrypt(options) {
20
+ if (options === void 0) {
21
+ options = {};
22
+ }
23
+ this.default_key_size = options.default_key_size ? parseInt(options.default_key_size, 10) : 1024;
24
+ this.default_public_exponent = options.default_public_exponent || "010001"; // 65537 default openssl public exponent for rsa key type
25
+ this.log = options.log || false;
26
+ // The private and public key.
27
+ this.key = options.key || null;
28
+ }
29
+ /**
30
+ * Method to set the rsa key parameter (one method is enough to set both the public
31
+ * and the private key, since the private key contains the public key paramenters)
32
+ * Log a warning if logs are enabled
33
+ * @param {Object|string} key the pem encoded string or an object (with or without header/footer)
34
+ * @public
35
+ */
36
+ JSEncrypt.prototype.setKey = function (key) {
37
+ if (key) {
38
+ if (this.log && this.key) {
39
+ console.warn("A key was already set, overriding existing.");
40
+ }
41
+ this.key = new JSEncryptRSAKey(key);
42
+ } else if (!this.key && this.log) {
43
+ console.error("A key was not set.");
44
+ }
45
+ };
46
+ /**
47
+ * Proxy method for setKey, for api compatibility
48
+ * @see setKey
49
+ * @public
50
+ */
51
+ JSEncrypt.prototype.setPrivateKey = function (privkey) {
52
+ // Create the key.
53
+ this.setKey(privkey);
54
+ };
55
+ /**
56
+ * Proxy method for setKey, for api compatibility
57
+ * @see setKey
58
+ * @public
59
+ */
60
+ JSEncrypt.prototype.setPublicKey = function (pubkey) {
61
+ // Sets the public key.
62
+ this.setKey(pubkey);
63
+ };
64
+ /**
65
+ * Proxy method for RSAKey object's decrypt, decrypt the string using the private
66
+ * components of the rsa key object. Note that if the object was not set will be created
67
+ * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
68
+ * @param {string} str base64 encoded crypted string to decrypt
69
+ * @return {string} the decrypted string
70
+ * @public
71
+ */
72
+ JSEncrypt.prototype.decrypt = function (str) {
73
+ // Return the decrypted string.
74
+ try {
75
+ return this.getKey().decrypt(b64tohex(str));
76
+ } catch (ex) {
77
+ return false;
78
+ }
79
+ };
80
+ /**
81
+ * Proxy method for RSAKey object's encrypt, encrypt the string using the public
82
+ * components of the rsa key object. Note that if the object was not set will be created
83
+ * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
84
+ * @param {string} str the string to encrypt
85
+ * @return {string} the encrypted string encoded in base64
86
+ * @public
87
+ */
88
+ JSEncrypt.prototype.encrypt = function (str) {
89
+ // Return the encrypted string.
90
+ try {
91
+ return hex2b64(this.getKey().encrypt(str));
92
+ } catch (ex) {
93
+ return false;
94
+ }
95
+ };
96
+ /**
97
+ * Proxy method for RSAKey object's encrypt with padding: RSA_PKCS1_OAEP_PADDING and oaepHash: sha256,
98
+ * encrypt the string using the public
99
+ * components of the rsa key object. Note that if the object was not set will be created
100
+ * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor
101
+ * @param {string} str the string to encrypt
102
+ * @return {string} the encrypted string encoded in base64
103
+ * @public
104
+ */
105
+ JSEncrypt.prototype.encryptOAEP = function (str) {
106
+ // Return the encrypted string.
107
+ try {
108
+ return hex2b64(this.getKey().encrypt(str, oaep_pad));
109
+ } catch (ex) {
110
+ return false;
111
+ }
112
+ };
113
+ /**
114
+ * Proxy method for RSAKey object's sign.
115
+ * @param {string} str the string to sign
116
+ * @param {function} digestMethod hash method
117
+ * @param {string} digestName the name of the hash algorithm
118
+ * @return {string} the signature encoded in base64
119
+ * @public
120
+ */
121
+ JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {
122
+ if (digestMethod === void 0) {
123
+ digestMethod = function (raw) {
124
+ return raw;
125
+ };
126
+ }
127
+ if (digestName === void 0) {
128
+ digestName = "";
129
+ }
130
+ // return the RSA signature of 'str' in 'hex' format.
131
+ try {
132
+ return hex2b64(this.getKey().sign(str, digestMethod, digestName));
133
+ } catch (ex) {
134
+ return false;
135
+ }
136
+ };
137
+ /**
138
+ * Signs a string using the SHA-256 hash algorithm.
139
+ * @param str the string to sign
140
+ * @returns the base64 encoded signature or false on failure
141
+ */
142
+ JSEncrypt.prototype.signSha256 = function (str) {
143
+ return this.sign(str, function (text) {
144
+ return rstr2hex(rstr_sha256(text));
145
+ }, "sha256");
146
+ };
147
+ /**
148
+ * Proxy method for RSAKey object's verify.
149
+ * @param {string} str the string to verify
150
+ * @param {string} signature the signature encoded in base64 to compare the string to
151
+ * @param {function} digestMethod hash method
152
+ * @return {boolean} whether the data and signature match
153
+ * @public
154
+ */
155
+ JSEncrypt.prototype.verify = function (str, signature, digestMethod) {
156
+ if (digestMethod === void 0) {
157
+ digestMethod = function (raw) {
158
+ return raw;
159
+ };
160
+ }
161
+ // Return the decrypted 'digest' of the signature.
162
+ try {
163
+ return this.getKey().verify(str, b64tohex(signature), digestMethod);
164
+ } catch (ex) {
165
+ return false;
166
+ }
167
+ };
168
+ /**
169
+ * Verifies a string using the SHA-256 hash algorithm.
170
+ * @param str the string to verify
171
+ * @param signature the base64 encoded signature to compare against
172
+ * @returns whether the signature is valid
173
+ */
174
+ JSEncrypt.prototype.verifySha256 = function (str, signature) {
175
+ return this.verify(str, signature, function (text) {
176
+ return rstr2hex(rstr_sha256(text));
177
+ });
178
+ };
179
+ /**
180
+ * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object
181
+ * will be created and returned
182
+ * @param {callback} [cb] the callback to be called if we want the key to be generated
183
+ * in an async fashion
184
+ * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object
185
+ * @public
186
+ */
187
+ JSEncrypt.prototype.getKey = function (cb) {
188
+ // Only create new if it does not exist.
189
+ if (!this.key) {
190
+ // Get a new private key.
191
+ this.key = new JSEncryptRSAKey();
192
+ if (cb && {}.toString.call(cb) === "[object Function]") {
193
+ this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);
194
+ return;
195
+ }
196
+ // Generate the key.
197
+ this.key.generate(this.default_key_size, this.default_public_exponent);
198
+ }
199
+ return this.key;
200
+ };
201
+ /**
202
+ * Returns the pem encoded representation of the private key
203
+ * If the key doesn't exists a new key will be created
204
+ * @returns {string} pem encoded representation of the private key WITH header and footer
205
+ * @public
206
+ */
207
+ JSEncrypt.prototype.getPrivateKey = function () {
208
+ // Return the private representation of this key.
209
+ return this.getKey().getPrivateKey();
210
+ };
211
+ /**
212
+ * Returns the pem encoded representation of the private key
213
+ * If the key doesn't exists a new key will be created
214
+ * @returns {string} pem encoded representation of the private key WITHOUT header and footer
215
+ * @public
216
+ */
217
+ JSEncrypt.prototype.getPrivateKeyB64 = function () {
218
+ // Return the private representation of this key.
219
+ return this.getKey().getPrivateBaseKeyB64();
220
+ };
221
+ /**
222
+ * Returns the pem encoded representation of the public key
223
+ * If the key doesn't exists a new key will be created
224
+ * @returns {string} pem encoded representation of the public key WITH header and footer
225
+ * @public
226
+ */
227
+ JSEncrypt.prototype.getPublicKey = function () {
228
+ // Return the private representation of this key.
229
+ return this.getKey().getPublicKey();
230
+ };
231
+ /**
232
+ * Returns the pem encoded representation of the public key
233
+ * If the key doesn't exists a new key will be created
234
+ * @returns {string} pem encoded representation of the public key WITHOUT header and footer
235
+ * @public
236
+ */
237
+ JSEncrypt.prototype.getPublicKeyB64 = function () {
238
+ // Return the private representation of this key.
239
+ return this.getKey().getPublicBaseKeyB64();
240
+ };
241
+ JSEncrypt.version = version;
242
+ return JSEncrypt;
243
+ }();
244
+
245
+ export { JSEncrypt };
246
+ //# sourceMappingURL=JSEncrypt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JSEncrypt.js","sources":["../../../../node_modules/jsencrypt/lib/JSEncrypt.js"],"sourcesContent":["var _a;\nimport { b64tohex, hex2b64 } from \"./lib/jsbn/base64\";\nimport { JSEncryptRSAKey } from \"./JSEncryptRSAKey\";\nimport { oaep_pad } from './lib/jsbn/rsa';\nimport { rstr_sha256, rstr2hex } from './lib/jsbn/sha256';\nvar version = typeof process !== \"undefined\" ? (_a = process.env) === null || _a === void 0 ? void 0 : _a.npm_package_version : undefined;\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - key {JSEncryptRSAKey} default: null\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nvar JSEncrypt = /** @class */ (function () {\n function JSEncrypt(options) {\n if (options === void 0) { options = {}; }\n this.default_key_size = options.default_key_size\n ? parseInt(options.default_key_size, 10)\n : 1024;\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = options.key || null;\n }\n /**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\n JSEncrypt.prototype.setKey = function (key) {\n if (key) {\n if (this.log && this.key) {\n console.warn(\"A key was already set, overriding existing.\");\n }\n this.key = new JSEncryptRSAKey(key);\n }\n else if (!this.key && this.log) {\n console.error(\"A key was not set.\");\n }\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n };\n /**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\n JSEncrypt.prototype.decrypt = function (str) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt(b64tohex(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encrypt = function (str) {\n // Return the encrypted string.\n try {\n return hex2b64(this.getKey().encrypt(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt with padding: RSA_PKCS1_OAEP_PADDING and oaepHash: sha256,\n * encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encryptOAEP = function (str) {\n // Return the encrypted string.\n try {\n return hex2b64(this.getKey().encrypt(str, oaep_pad));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's sign.\n * @param {string} str the string to sign\n * @param {function} digestMethod hash method\n * @param {string} digestName the name of the hash algorithm\n * @return {string} the signature encoded in base64\n * @public\n */\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\n if (digestMethod === void 0) { digestMethod = function (raw) { return raw; }; }\n if (digestName === void 0) { digestName = \"\"; }\n // return the RSA signature of 'str' in 'hex' format.\n try {\n return hex2b64(this.getKey().sign(str, digestMethod, digestName));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Signs a string using the SHA-256 hash algorithm.\n * @param str the string to sign\n * @returns the base64 encoded signature or false on failure\n */\n JSEncrypt.prototype.signSha256 = function (str) {\n return this.sign(str, function (text) {\n return rstr2hex(rstr_sha256(text));\n }, \"sha256\");\n };\n /**\n * Proxy method for RSAKey object's verify.\n * @param {string} str the string to verify\n * @param {string} signature the signature encoded in base64 to compare the string to\n * @param {function} digestMethod hash method\n * @return {boolean} whether the data and signature match\n * @public\n */\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\n if (digestMethod === void 0) { digestMethod = function (raw) { return raw; }; }\n // Return the decrypted 'digest' of the signature.\n try {\n return this.getKey().verify(str, b64tohex(signature), digestMethod);\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Verifies a string using the SHA-256 hash algorithm.\n * @param str the string to verify\n * @param signature the base64 encoded signature to compare against\n * @returns whether the signature is valid\n */\n JSEncrypt.prototype.verifySha256 = function (str, signature) {\n return this.verify(str, signature, function (text) {\n return rstr2hex(rstr_sha256(text));\n });\n };\n /**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\n JSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n };\n JSEncrypt.version = version;\n return JSEncrypt;\n}());\nexport { JSEncrypt };\n"],"names":["_a","version","process","env","npm_package_version","undefined","JSEncrypt","options","default_key_size","parseInt","default_public_exponent","log","key","prototype","setKey","console","warn","JSEncryptRSAKey","error","setPrivateKey","privkey","setPublicKey","pubkey","decrypt","str","getKey","b64tohex","ex","encrypt","hex2b64","encryptOAEP","oaep_pad","sign","digestMethod","digestName","raw","signSha256","text","rstr2hex","rstr_sha256","verify","signature","verifySha256","cb","toString","call","generateAsync","generate","getPrivateKey","getPrivateKeyB64","getPrivateBaseKeyB64","getPublicKey","getPublicKeyB64","getPublicBaseKeyB64"],"mappings":";;;;;AAAA,IAAIA,EAAE;AAKN,IAAIC,OAAO,GAAG,OAAOC,OAAO,KAAK,WAAW,GAAG,CAACF,EAAE,GAAGE,OAAO,CAACC,GAAG,MAAM,IAAI,IAAIH,EAAE,KAAK,MAAM,GAAG,MAAM,GAAGA,EAAE,CAACI,mBAAmB,GAAGC,SAAS;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,SAAS,gBAAkB,YAAY;EACvC,SAASA,SAASA,CAACC,OAAO,EAAE;AACxB,IAAA,IAAIA,OAAO,KAAK,MAAM,EAAE;MAAEA,OAAO,GAAG,EAAE;AAAE,IAAA;AACxC,IAAA,IAAI,CAACC,gBAAgB,GAAGD,OAAO,CAACC,gBAAgB,GAC1CC,QA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