@gct-paas/core 0.1.4-dev.3 → 0.1.4-dev.4

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 (122) hide show
  1. package/dist/index.min.cjs +1 -1
  2. package/dist/index.system.min.js +1 -1
  3. package/es/controller/form/form.controller.mjs +1 -2
  4. package/es/controller/gct-form/gct-form.controller.mjs +1 -2
  5. package/es/global/gct/gct.d.ts +1 -1
  6. package/es/interface/controller/form/form.controller.mjs +1 -1
  7. package/es/interface/hooks/i-designer-hooks.mjs +1 -1
  8. package/es/interface/i-modal/i-modal.mjs +1 -1
  9. package/es/modules/api-service/api-manage.mjs +1 -1
  10. package/es/modules/api-service/api-service.interface.d.ts +2 -2
  11. package/es/modules/api-service/api-service.interface.mjs +2 -2
  12. package/es/modules/api-service/api-service.mjs +1 -1
  13. package/es/modules/api-service/index.mjs +2 -4
  14. package/es/modules/env-manager/env-manager.d.ts +1 -1
  15. package/es/modules/env-manager/env-manager.interface.d.ts +1 -1
  16. package/es/modules/platform-config/useBasicSetting.d.ts +2 -2
  17. package/es/modules/platform-config/useDeploySetting.d.ts +1 -1
  18. package/es/modules/platform-config/useLoginSetting.d.ts +1 -1
  19. package/es/modules/platform-config/useOrgSetting.d.ts +1 -1
  20. package/es/modules/platform-config/useSecuritySetting.d.ts +1 -1
  21. package/es/modules/platform-config/useThemeSetting.d.ts +1 -1
  22. package/es/modules/platform-config/useWatermarkSetting.d.ts +1 -1
  23. package/es/register/designer-register/designer-register.mjs +1 -2
  24. package/es/register/render-register/render-register.mjs +1 -2
  25. package/es/store/global-store.mjs +1 -1
  26. package/es/types/index.d.ts +2 -2
  27. package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +1 -1
  28. package/es/utils/plugin-static-resource/plugin-static-resource.mjs +1 -1
  29. package/es/utils/tools/tools.mjs +1 -2
  30. package/package.json +6 -8
  31. package/es/_virtual/_commonjs-dynamic-modules.mjs +0 -5
  32. package/es/_virtual/_commonjsHelpers.mjs +0 -44
  33. package/es/_virtual/aes.mjs +0 -3
  34. package/es/_virtual/blowfish.mjs +0 -3
  35. package/es/_virtual/cipher-core.mjs +0 -3
  36. package/es/_virtual/core.mjs +0 -3
  37. package/es/_virtual/enc-base64.mjs +0 -3
  38. package/es/_virtual/enc-base64url.mjs +0 -3
  39. package/es/_virtual/enc-utf16.mjs +0 -3
  40. package/es/_virtual/evpkdf.mjs +0 -3
  41. package/es/_virtual/format-hex.mjs +0 -3
  42. package/es/_virtual/hmac.mjs +0 -3
  43. package/es/_virtual/index.mjs +0 -7
  44. package/es/_virtual/index2.mjs +0 -7
  45. package/es/_virtual/index3.mjs +0 -3
  46. package/es/_virtual/lib-typedarrays.mjs +0 -3
  47. package/es/_virtual/md5.mjs +0 -3
  48. package/es/_virtual/mode-cfb.mjs +0 -3
  49. package/es/_virtual/mode-ctr-gladman.mjs +0 -3
  50. package/es/_virtual/mode-ctr.mjs +0 -3
  51. package/es/_virtual/mode-ecb.mjs +0 -3
  52. package/es/_virtual/mode-ofb.mjs +0 -3
  53. package/es/_virtual/pad-ansix923.mjs +0 -3
  54. package/es/_virtual/pad-iso10126.mjs +0 -3
  55. package/es/_virtual/pad-iso97971.mjs +0 -3
  56. package/es/_virtual/pad-nopadding.mjs +0 -3
  57. package/es/_virtual/pad-zeropadding.mjs +0 -3
  58. package/es/_virtual/pbkdf2.mjs +0 -3
  59. package/es/_virtual/rabbit-legacy.mjs +0 -3
  60. package/es/_virtual/rabbit.mjs +0 -3
  61. package/es/_virtual/rc4.mjs +0 -3
  62. package/es/_virtual/ripemd160.mjs +0 -3
  63. package/es/_virtual/sha1.mjs +0 -3
  64. package/es/_virtual/sha224.mjs +0 -3
  65. package/es/_virtual/sha256.mjs +0 -3
  66. package/es/_virtual/sha3.mjs +0 -3
  67. package/es/_virtual/sha384.mjs +0 -3
  68. package/es/_virtual/sha512.mjs +0 -3
  69. package/es/_virtual/tripledes.mjs +0 -3
  70. package/es/_virtual/x64-core.mjs +0 -3
  71. package/es/node_modules/.pnpm/@gct-paas_api-apaas@0.0.2-dev.4/node_modules/@gct-paas/api-apaas/es/index.mjs +0 -3
  72. package/es/node_modules/.pnpm/@gct-paas_api-apaas@0.0.2-dev.4/node_modules/@gct-paas/api-apaas/es/service/api-config.mjs +0 -8213
  73. package/es/node_modules/.pnpm/@gct-paas_api-platform@0.0.2-dev.4/node_modules/@gct-paas/api-platform/es/index.mjs +0 -3
  74. package/es/node_modules/.pnpm/@gct-paas_api-platform@0.0.2-dev.4/node_modules/@gct-paas/api-platform/es/service/api-config.mjs +0 -7156
  75. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.mjs +0 -255
  76. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/blowfish.mjs +0 -492
  77. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/cipher-core.mjs +0 -913
  78. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.mjs +0 -824
  79. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64.mjs +0 -153
  80. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-base64url.mjs +0 -165
  81. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf16.mjs +0 -166
  82. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/evpkdf.mjs +0 -153
  83. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/format-hex.mjs +0 -84
  84. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/hmac.mjs +0 -160
  85. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/index.mjs +0 -69
  86. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/lib-typedarrays.mjs +0 -93
  87. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.mjs +0 -285
  88. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-cfb.mjs +0 -98
  89. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr-gladman.mjs +0 -134
  90. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ctr.mjs +0 -76
  91. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.mjs +0 -58
  92. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ofb.mjs +0 -72
  93. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-ansix923.mjs +0 -67
  94. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso10126.mjs +0 -62
  95. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-iso97971.mjs +0 -58
  96. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-nopadding.mjs +0 -48
  97. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-zeropadding.mjs +0 -65
  98. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pbkdf2.mjs +0 -164
  99. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit-legacy.mjs +0 -211
  100. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rabbit.mjs +0 -213
  101. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/rc4.mjs +0 -160
  102. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ripemd160.mjs +0 -284
  103. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha1.mjs +0 -167
  104. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha224.mjs +0 -98
  105. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha256.mjs +0 -216
  106. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha3.mjs +0 -344
  107. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha384.mjs +0 -102
  108. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/sha512.mjs +0 -344
  109. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/tripledes.mjs +0 -800
  110. package/es/node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/x64-core.mjs +0 -321
  111. package/es/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.mjs +0 -541
  112. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/async-series-hook/async-series-hook.mjs +0 -73
  113. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/index.mjs +0 -2
  114. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/hook/sync-series-hook/sync-series-hook.mjs +0 -100
  115. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/index.mjs +0 -2
  116. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/array/array.mjs +0 -47
  117. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/index.mjs +0 -5
  118. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/object/object.mjs +0 -24
  119. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/qx-event/qx-event.mjs +0 -94
  120. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/qx-event-emitter/qx-event-emitter.mjs +0 -146
  121. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/type-util/type-util.mjs +0 -149
  122. package/es/node_modules/.pnpm/qx-util@0.4.8/node_modules/qx-util/out/utils/util/util.mjs +0 -227
@@ -1,65 +0,0 @@
1
- import '../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __module as padZeropadding$1 } from '../../../../../_virtual/pad-zeropadding.mjs';
3
- import { __require as requireCore } from './core.mjs';
4
- import { __require as requireCipherCore } from './cipher-core.mjs';
5
-
6
- var padZeropadding = padZeropadding$1.exports;
7
-
8
- var hasRequiredPadZeropadding;
9
-
10
- function requirePadZeropadding () {
11
- if (hasRequiredPadZeropadding) return padZeropadding$1.exports;
12
- hasRequiredPadZeropadding = 1;
13
- (function (module, exports) {
14
- ;(function (root, factory, undef) {
15
- if ('object' === "object") {
16
- // CommonJS
17
- module.exports = exports = factory(requireCore(), requireCipherCore());
18
- }
19
- else if (typeof undefined === "function" && undefined.amd) {
20
- // AMD
21
- undefined(["./core", "./cipher-core"], factory);
22
- }
23
- else {
24
- // Global (browser)
25
- factory(root.CryptoJS);
26
- }
27
- }(padZeropadding, function (CryptoJS) {
28
-
29
- /**
30
- * Zero padding strategy.
31
- */
32
- CryptoJS.pad.ZeroPadding = {
33
- pad: function (data, blockSize) {
34
- // Shortcut
35
- var blockSizeBytes = blockSize * 4;
36
-
37
- // Pad
38
- data.clamp();
39
- data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);
40
- },
41
-
42
- unpad: function (data) {
43
- // Shortcut
44
- var dataWords = data.words;
45
-
46
- // Unpad
47
- var i = data.sigBytes - 1;
48
- for (var i = data.sigBytes - 1; i >= 0; i--) {
49
- if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {
50
- data.sigBytes = i + 1;
51
- break;
52
- }
53
- }
54
- }
55
- };
56
-
57
-
58
- return CryptoJS.pad.ZeroPadding;
59
-
60
- }));
61
- } (padZeropadding$1, padZeropadding$1.exports));
62
- return padZeropadding$1.exports;
63
- }
64
-
65
- export { requirePadZeropadding as __require };
@@ -1,164 +0,0 @@
1
- import '../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __module as pbkdf2$1 } from '../../../../../_virtual/pbkdf2.mjs';
3
- import { __require as requireCore } from './core.mjs';
4
- import { __require as requireSha256 } from './sha256.mjs';
5
- import { __require as requireHmac } from './hmac.mjs';
6
-
7
- var pbkdf2 = pbkdf2$1.exports;
8
-
9
- var hasRequiredPbkdf2;
10
-
11
- function requirePbkdf2 () {
12
- if (hasRequiredPbkdf2) return pbkdf2$1.exports;
13
- hasRequiredPbkdf2 = 1;
14
- (function (module, exports) {
15
- ;(function (root, factory, undef) {
16
- if ('object' === "object") {
17
- // CommonJS
18
- module.exports = exports = factory(requireCore(), requireSha256(), requireHmac());
19
- }
20
- else if (typeof undefined === "function" && undefined.amd) {
21
- // AMD
22
- undefined(["./core", "./sha256", "./hmac"], factory);
23
- }
24
- else {
25
- // Global (browser)
26
- factory(root.CryptoJS);
27
- }
28
- }(pbkdf2, function (CryptoJS) {
29
-
30
- (function () {
31
- // Shortcuts
32
- var C = CryptoJS;
33
- var C_lib = C.lib;
34
- var Base = C_lib.Base;
35
- var WordArray = C_lib.WordArray;
36
- var C_algo = C.algo;
37
- var SHA256 = C_algo.SHA256;
38
- var HMAC = C_algo.HMAC;
39
-
40
- /**
41
- * Password-Based Key Derivation Function 2 algorithm.
42
- */
43
- var PBKDF2 = C_algo.PBKDF2 = Base.extend({
44
- /**
45
- * Configuration options.
46
- *
47
- * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
48
- * @property {Hasher} hasher The hasher to use. Default: SHA256
49
- * @property {number} iterations The number of iterations to perform. Default: 250000
50
- */
51
- cfg: Base.extend({
52
- keySize: 128/32,
53
- hasher: SHA256,
54
- iterations: 250000
55
- }),
56
-
57
- /**
58
- * Initializes a newly created key derivation function.
59
- *
60
- * @param {Object} cfg (Optional) The configuration options to use for the derivation.
61
- *
62
- * @example
63
- *
64
- * var kdf = CryptoJS.algo.PBKDF2.create();
65
- * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
66
- * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
67
- */
68
- init: function (cfg) {
69
- this.cfg = this.cfg.extend(cfg);
70
- },
71
-
72
- /**
73
- * Computes the Password-Based Key Derivation Function 2.
74
- *
75
- * @param {WordArray|string} password The password.
76
- * @param {WordArray|string} salt A salt.
77
- *
78
- * @return {WordArray} The derived key.
79
- *
80
- * @example
81
- *
82
- * var key = kdf.compute(password, salt);
83
- */
84
- compute: function (password, salt) {
85
- // Shortcut
86
- var cfg = this.cfg;
87
-
88
- // Init HMAC
89
- var hmac = HMAC.create(cfg.hasher, password);
90
-
91
- // Initial values
92
- var derivedKey = WordArray.create();
93
- var blockIndex = WordArray.create([0x00000001]);
94
-
95
- // Shortcuts
96
- var derivedKeyWords = derivedKey.words;
97
- var blockIndexWords = blockIndex.words;
98
- var keySize = cfg.keySize;
99
- var iterations = cfg.iterations;
100
-
101
- // Generate key
102
- while (derivedKeyWords.length < keySize) {
103
- var block = hmac.update(salt).finalize(blockIndex);
104
- hmac.reset();
105
-
106
- // Shortcuts
107
- var blockWords = block.words;
108
- var blockWordsLength = blockWords.length;
109
-
110
- // Iterations
111
- var intermediate = block;
112
- for (var i = 1; i < iterations; i++) {
113
- intermediate = hmac.finalize(intermediate);
114
- hmac.reset();
115
-
116
- // Shortcut
117
- var intermediateWords = intermediate.words;
118
-
119
- // XOR intermediate with block
120
- for (var j = 0; j < blockWordsLength; j++) {
121
- blockWords[j] ^= intermediateWords[j];
122
- }
123
- }
124
-
125
- derivedKey.concat(block);
126
- blockIndexWords[0]++;
127
- }
128
- derivedKey.sigBytes = keySize * 4;
129
-
130
- return derivedKey;
131
- }
132
- });
133
-
134
- /**
135
- * Computes the Password-Based Key Derivation Function 2.
136
- *
137
- * @param {WordArray|string} password The password.
138
- * @param {WordArray|string} salt A salt.
139
- * @param {Object} cfg (Optional) The configuration options to use for this computation.
140
- *
141
- * @return {WordArray} The derived key.
142
- *
143
- * @static
144
- *
145
- * @example
146
- *
147
- * var key = CryptoJS.PBKDF2(password, salt);
148
- * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
149
- * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
150
- */
151
- C.PBKDF2 = function (password, salt, cfg) {
152
- return PBKDF2.create(cfg).compute(password, salt);
153
- };
154
- }());
155
-
156
-
157
- return CryptoJS.PBKDF2;
158
-
159
- }));
160
- } (pbkdf2$1, pbkdf2$1.exports));
161
- return pbkdf2$1.exports;
162
- }
163
-
164
- export { requirePbkdf2 as __require };
@@ -1,211 +0,0 @@
1
- import '../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __module as rabbitLegacy$1 } from '../../../../../_virtual/rabbit-legacy.mjs';
3
- import { __require as requireCore } from './core.mjs';
4
- import { __require as requireEncBase64 } from './enc-base64.mjs';
5
- import { __require as requireMd5 } from './md5.mjs';
6
- import { __require as requireEvpkdf } from './evpkdf.mjs';
7
- import { __require as requireCipherCore } from './cipher-core.mjs';
8
-
9
- var rabbitLegacy = rabbitLegacy$1.exports;
10
-
11
- var hasRequiredRabbitLegacy;
12
-
13
- function requireRabbitLegacy () {
14
- if (hasRequiredRabbitLegacy) return rabbitLegacy$1.exports;
15
- hasRequiredRabbitLegacy = 1;
16
- (function (module, exports) {
17
- ;(function (root, factory, undef) {
18
- if ('object' === "object") {
19
- // CommonJS
20
- module.exports = exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
21
- }
22
- else if (typeof undefined === "function" && undefined.amd) {
23
- // AMD
24
- undefined(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
25
- }
26
- else {
27
- // Global (browser)
28
- factory(root.CryptoJS);
29
- }
30
- }(rabbitLegacy, function (CryptoJS) {
31
-
32
- (function () {
33
- // Shortcuts
34
- var C = CryptoJS;
35
- var C_lib = C.lib;
36
- var StreamCipher = C_lib.StreamCipher;
37
- var C_algo = C.algo;
38
-
39
- // Reusable objects
40
- var S = [];
41
- var C_ = [];
42
- var G = [];
43
-
44
- /**
45
- * Rabbit stream cipher algorithm.
46
- *
47
- * This is a legacy version that neglected to convert the key to little-endian.
48
- * This error doesn't affect the cipher's security,
49
- * but it does affect its compatibility with other implementations.
50
- */
51
- var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
52
- _doReset: function () {
53
- // Shortcuts
54
- var K = this._key.words;
55
- var iv = this.cfg.iv;
56
-
57
- // Generate initial state values
58
- var X = this._X = [
59
- K[0], (K[3] << 16) | (K[2] >>> 16),
60
- K[1], (K[0] << 16) | (K[3] >>> 16),
61
- K[2], (K[1] << 16) | (K[0] >>> 16),
62
- K[3], (K[2] << 16) | (K[1] >>> 16)
63
- ];
64
-
65
- // Generate initial counter values
66
- var C = this._C = [
67
- (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
68
- (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
69
- (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
70
- (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
71
- ];
72
-
73
- // Carry bit
74
- this._b = 0;
75
-
76
- // Iterate the system four times
77
- for (var i = 0; i < 4; i++) {
78
- nextState.call(this);
79
- }
80
-
81
- // Modify the counters
82
- for (var i = 0; i < 8; i++) {
83
- C[i] ^= X[(i + 4) & 7];
84
- }
85
-
86
- // IV setup
87
- if (iv) {
88
- // Shortcuts
89
- var IV = iv.words;
90
- var IV_0 = IV[0];
91
- var IV_1 = IV[1];
92
-
93
- // Generate four subvectors
94
- var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
95
- var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
96
- var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
97
- var i3 = (i2 << 16) | (i0 & 0x0000ffff);
98
-
99
- // Modify counter values
100
- C[0] ^= i0;
101
- C[1] ^= i1;
102
- C[2] ^= i2;
103
- C[3] ^= i3;
104
- C[4] ^= i0;
105
- C[5] ^= i1;
106
- C[6] ^= i2;
107
- C[7] ^= i3;
108
-
109
- // Iterate the system four times
110
- for (var i = 0; i < 4; i++) {
111
- nextState.call(this);
112
- }
113
- }
114
- },
115
-
116
- _doProcessBlock: function (M, offset) {
117
- // Shortcut
118
- var X = this._X;
119
-
120
- // Iterate the system
121
- nextState.call(this);
122
-
123
- // Generate four keystream words
124
- S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
125
- S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
126
- S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
127
- S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
128
-
129
- for (var i = 0; i < 4; i++) {
130
- // Swap endian
131
- S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
132
- (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
133
-
134
- // Encrypt
135
- M[offset + i] ^= S[i];
136
- }
137
- },
138
-
139
- blockSize: 128/32,
140
-
141
- ivSize: 64/32
142
- });
143
-
144
- function nextState() {
145
- // Shortcuts
146
- var X = this._X;
147
- var C = this._C;
148
-
149
- // Save old counter values
150
- for (var i = 0; i < 8; i++) {
151
- C_[i] = C[i];
152
- }
153
-
154
- // Calculate new counter values
155
- C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
156
- C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
157
- C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
158
- C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
159
- C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
160
- C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
161
- C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
162
- C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
163
- this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
164
-
165
- // Calculate the g-values
166
- for (var i = 0; i < 8; i++) {
167
- var gx = X[i] + C[i];
168
-
169
- // Construct high and low argument for squaring
170
- var ga = gx & 0xffff;
171
- var gb = gx >>> 16;
172
-
173
- // Calculate high and low result of squaring
174
- var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
175
- var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
176
-
177
- // High XOR low
178
- G[i] = gh ^ gl;
179
- }
180
-
181
- // Calculate new state values
182
- X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
183
- X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;
184
- X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
185
- X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;
186
- X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
187
- X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;
188
- X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
189
- X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;
190
- }
191
-
192
- /**
193
- * Shortcut functions to the cipher's object interface.
194
- *
195
- * @example
196
- *
197
- * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
198
- * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
199
- */
200
- C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
201
- }());
202
-
203
-
204
- return CryptoJS.RabbitLegacy;
205
-
206
- }));
207
- } (rabbitLegacy$1, rabbitLegacy$1.exports));
208
- return rabbitLegacy$1.exports;
209
- }
210
-
211
- export { requireRabbitLegacy as __require };
@@ -1,213 +0,0 @@
1
- import '../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __module as rabbit$1 } from '../../../../../_virtual/rabbit.mjs';
3
- import { __require as requireCore } from './core.mjs';
4
- import { __require as requireEncBase64 } from './enc-base64.mjs';
5
- import { __require as requireMd5 } from './md5.mjs';
6
- import { __require as requireEvpkdf } from './evpkdf.mjs';
7
- import { __require as requireCipherCore } from './cipher-core.mjs';
8
-
9
- var rabbit = rabbit$1.exports;
10
-
11
- var hasRequiredRabbit;
12
-
13
- function requireRabbit () {
14
- if (hasRequiredRabbit) return rabbit$1.exports;
15
- hasRequiredRabbit = 1;
16
- (function (module, exports) {
17
- ;(function (root, factory, undef) {
18
- if ('object' === "object") {
19
- // CommonJS
20
- module.exports = exports = factory(requireCore(), requireEncBase64(), requireMd5(), requireEvpkdf(), requireCipherCore());
21
- }
22
- else if (typeof undefined === "function" && undefined.amd) {
23
- // AMD
24
- undefined(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
25
- }
26
- else {
27
- // Global (browser)
28
- factory(root.CryptoJS);
29
- }
30
- }(rabbit, function (CryptoJS) {
31
-
32
- (function () {
33
- // Shortcuts
34
- var C = CryptoJS;
35
- var C_lib = C.lib;
36
- var StreamCipher = C_lib.StreamCipher;
37
- var C_algo = C.algo;
38
-
39
- // Reusable objects
40
- var S = [];
41
- var C_ = [];
42
- var G = [];
43
-
44
- /**
45
- * Rabbit stream cipher algorithm
46
- */
47
- var Rabbit = C_algo.Rabbit = StreamCipher.extend({
48
- _doReset: function () {
49
- // Shortcuts
50
- var K = this._key.words;
51
- var iv = this.cfg.iv;
52
-
53
- // Swap endian
54
- for (var i = 0; i < 4; i++) {
55
- K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |
56
- (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);
57
- }
58
-
59
- // Generate initial state values
60
- var X = this._X = [
61
- K[0], (K[3] << 16) | (K[2] >>> 16),
62
- K[1], (K[0] << 16) | (K[3] >>> 16),
63
- K[2], (K[1] << 16) | (K[0] >>> 16),
64
- K[3], (K[2] << 16) | (K[1] >>> 16)
65
- ];
66
-
67
- // Generate initial counter values
68
- var C = this._C = [
69
- (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
70
- (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
71
- (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
72
- (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
73
- ];
74
-
75
- // Carry bit
76
- this._b = 0;
77
-
78
- // Iterate the system four times
79
- for (var i = 0; i < 4; i++) {
80
- nextState.call(this);
81
- }
82
-
83
- // Modify the counters
84
- for (var i = 0; i < 8; i++) {
85
- C[i] ^= X[(i + 4) & 7];
86
- }
87
-
88
- // IV setup
89
- if (iv) {
90
- // Shortcuts
91
- var IV = iv.words;
92
- var IV_0 = IV[0];
93
- var IV_1 = IV[1];
94
-
95
- // Generate four subvectors
96
- var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);
97
- var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);
98
- var i1 = (i0 >>> 16) | (i2 & 0xffff0000);
99
- var i3 = (i2 << 16) | (i0 & 0x0000ffff);
100
-
101
- // Modify counter values
102
- C[0] ^= i0;
103
- C[1] ^= i1;
104
- C[2] ^= i2;
105
- C[3] ^= i3;
106
- C[4] ^= i0;
107
- C[5] ^= i1;
108
- C[6] ^= i2;
109
- C[7] ^= i3;
110
-
111
- // Iterate the system four times
112
- for (var i = 0; i < 4; i++) {
113
- nextState.call(this);
114
- }
115
- }
116
- },
117
-
118
- _doProcessBlock: function (M, offset) {
119
- // Shortcut
120
- var X = this._X;
121
-
122
- // Iterate the system
123
- nextState.call(this);
124
-
125
- // Generate four keystream words
126
- S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);
127
- S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);
128
- S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);
129
- S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);
130
-
131
- for (var i = 0; i < 4; i++) {
132
- // Swap endian
133
- S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
134
- (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
135
-
136
- // Encrypt
137
- M[offset + i] ^= S[i];
138
- }
139
- },
140
-
141
- blockSize: 128/32,
142
-
143
- ivSize: 64/32
144
- });
145
-
146
- function nextState() {
147
- // Shortcuts
148
- var X = this._X;
149
- var C = this._C;
150
-
151
- // Save old counter values
152
- for (var i = 0; i < 8; i++) {
153
- C_[i] = C[i];
154
- }
155
-
156
- // Calculate new counter values
157
- C[0] = (C[0] + 0x4d34d34d + this._b) | 0;
158
- C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;
159
- C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;
160
- C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;
161
- C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;
162
- C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;
163
- C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;
164
- C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;
165
- this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;
166
-
167
- // Calculate the g-values
168
- for (var i = 0; i < 8; i++) {
169
- var gx = X[i] + C[i];
170
-
171
- // Construct high and low argument for squaring
172
- var ga = gx & 0xffff;
173
- var gb = gx >>> 16;
174
-
175
- // Calculate high and low result of squaring
176
- var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;
177
- var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);
178
-
179
- // High XOR low
180
- G[i] = gh ^ gl;
181
- }
182
-
183
- // Calculate new state values
184
- X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;
185
- X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;
186
- X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;
187
- X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;
188
- X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;
189
- X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;
190
- X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;
191
- X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;
192
- }
193
-
194
- /**
195
- * Shortcut functions to the cipher's object interface.
196
- *
197
- * @example
198
- *
199
- * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
200
- * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
201
- */
202
- C.Rabbit = StreamCipher._createHelper(Rabbit);
203
- }());
204
-
205
-
206
- return CryptoJS.Rabbit;
207
-
208
- }));
209
- } (rabbit$1, rabbit$1.exports));
210
- return rabbit$1.exports;
211
- }
212
-
213
- export { requireRabbit as __require };