@aidc-toolkit/utility 0.9.14-beta → 0.9.16-beta

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 (43) hide show
  1. package/dist/character-set.d.ts +301 -0
  2. package/dist/character-set.d.ts.map +1 -0
  3. package/dist/character-set.js +559 -0
  4. package/dist/character-set.js.map +1 -0
  5. package/dist/index.d.ts +24 -909
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +7 -1
  8. package/dist/index.js.map +1 -0
  9. package/dist/locale/en/locale-strings.d.ts +33 -0
  10. package/dist/locale/en/locale-strings.d.ts.map +1 -0
  11. package/dist/locale/en/locale-strings.js +33 -0
  12. package/dist/locale/en/locale-strings.js.map +1 -0
  13. package/dist/locale/fr/locale-strings.d.ts +33 -0
  14. package/dist/locale/fr/locale-strings.d.ts.map +1 -0
  15. package/dist/locale/fr/locale-strings.js +33 -0
  16. package/dist/locale/fr/locale-strings.js.map +1 -0
  17. package/dist/locale/i18n.d.ts +27 -0
  18. package/dist/locale/i18n.d.ts.map +1 -0
  19. package/dist/locale/i18n.js +35 -0
  20. package/dist/locale/i18n.js.map +1 -0
  21. package/dist/record.d.ts +41 -0
  22. package/dist/record.d.ts.map +1 -0
  23. package/dist/record.js +55 -0
  24. package/dist/record.js.map +1 -0
  25. package/dist/reg-exp.d.ts +43 -0
  26. package/dist/reg-exp.d.ts.map +1 -0
  27. package/dist/reg-exp.js +55 -0
  28. package/dist/reg-exp.js.map +1 -0
  29. package/dist/sequence.d.ts +68 -0
  30. package/dist/sequence.d.ts.map +1 -0
  31. package/dist/sequence.js +96 -0
  32. package/dist/sequence.js.map +1 -0
  33. package/dist/string.d.ts +22 -0
  34. package/dist/string.d.ts.map +1 -0
  35. package/dist/string.js +2 -0
  36. package/dist/string.js.map +1 -0
  37. package/dist/transformer.d.ts +377 -0
  38. package/dist/transformer.d.ts.map +1 -0
  39. package/dist/transformer.js +483 -0
  40. package/dist/transformer.js.map +1 -0
  41. package/package.json +8 -8
  42. package/dist/index.cjs +0 -17
  43. package/dist/index.d.cts +0 -909
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Sequence. Defines an ascending or descending sequence of big integers implemented as an iterable.
3
+ */
4
+ export class Sequence {
5
+ /**
6
+ * Start value (inclusive).
7
+ */
8
+ _startValue;
9
+ /**
10
+ * End value (exclusive).
11
+ */
12
+ _endValue;
13
+ /**
14
+ * Count of values.
15
+ */
16
+ _count;
17
+ /**
18
+ * Delta to the next value; equal to the sign of the count.
19
+ */
20
+ _nextDelta;
21
+ /**
22
+ * Minimum value (inclusive).
23
+ */
24
+ _minimumValue;
25
+ /**
26
+ * Maximum value (inclusive).
27
+ */
28
+ _maximumValue;
29
+ /**
30
+ * Constructor.
31
+ *
32
+ * @param startValue
33
+ * Start value.
34
+ *
35
+ * @param count
36
+ * Count of values. If count is zero or positive, iteration ascends from start value, otherwise it descends from
37
+ * start value.
38
+ */
39
+ constructor(startValue, count) {
40
+ this._startValue = BigInt(startValue);
41
+ this._endValue = this._startValue + BigInt(count);
42
+ this._count = count;
43
+ if (count >= 0) {
44
+ this._nextDelta = 1n;
45
+ this._minimumValue = this._startValue;
46
+ this._maximumValue = this._endValue - 1n;
47
+ }
48
+ else {
49
+ this._nextDelta = -1n;
50
+ this._minimumValue = this._endValue + 1n;
51
+ this._maximumValue = this._startValue;
52
+ }
53
+ }
54
+ /**
55
+ * Get the start value (inclusive).
56
+ */
57
+ get startValue() {
58
+ return this._startValue;
59
+ }
60
+ /**
61
+ * Get the end value (exclusive).
62
+ */
63
+ get endValue() {
64
+ return this._endValue;
65
+ }
66
+ /**
67
+ * Get the count of values.
68
+ */
69
+ get count() {
70
+ return this._count;
71
+ }
72
+ /**
73
+ * Get the minimum value (inclusive).
74
+ */
75
+ get minimumValue() {
76
+ return this._minimumValue;
77
+ }
78
+ /**
79
+ * Get the maximum value (inclusive).
80
+ */
81
+ get maximumValue() {
82
+ return this._maximumValue;
83
+ }
84
+ /**
85
+ * Iterable implementation.
86
+ *
87
+ * @yields
88
+ * Next value in sequence.
89
+ */
90
+ *[Symbol.iterator]() {
91
+ for (let value = this._startValue; value !== this._endValue; value += this._nextDelta) {
92
+ yield value;
93
+ }
94
+ }
95
+ }
96
+ //# sourceMappingURL=sequence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sequence.js","sourceRoot":"","sources":["../src/sequence.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,QAAQ;IACjB;;OAEG;IACc,WAAW,CAAS;IAErC;;OAEG;IACc,SAAS,CAAS;IAEnC;;OAEG;IACc,MAAM,CAAS;IAEhC;;OAEG;IACc,UAAU,CAAW;IAEtC;;OAEG;IACc,aAAa,CAAS;IAEvC;;OAEG;IACc,aAAa,CAAS;IAEvC;;;;;;;;;OASG;IACH,YAAY,UAA2B,EAAE,KAAa;QAClD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACb,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;YACrB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC;YACtC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAC7C,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;YACzC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC;QAC1C,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,CAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,KAAK,IAAI,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpF,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * String validation interface. To ensure signature compatibility in implementing classes, string validation is
3
+ * controlled by validation interfaces specific to each validator type.
4
+ */
5
+ export interface StringValidation {
6
+ }
7
+ /**
8
+ * String validator interface.
9
+ */
10
+ export interface StringValidator<V extends StringValidation = StringValidation> {
11
+ /**
12
+ * Validate a string and throw an error if validation fails.
13
+ *
14
+ * @param s
15
+ * String.
16
+ *
17
+ * @param validation
18
+ * String validation parameters.
19
+ */
20
+ validate: (s: string, validation?: V) => void;
21
+ }
22
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,gBAAgB;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB;IAC1E;;;;;;;;OAQG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;CACjD"}
package/dist/string.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=string.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":""}
@@ -0,0 +1,377 @@
1
+ /**
2
+ * Transformer primitive type.
3
+ */
4
+ export type TransformerPrimitive = string | number | bigint | boolean;
5
+ /**
6
+ * Transformer input type, one of:
7
+ *
8
+ * - TInput (primitive type)
9
+ * - Iterable<TInput>
10
+ *
11
+ * @template TInput
12
+ * Transformer input primitive type.
13
+ */
14
+ export type TransformerInput<TInput extends TransformerPrimitive> = TInput | Iterable<TInput>;
15
+ /**
16
+ * Transformer callback, used to convert transformed value to its final value.
17
+ *
18
+ * @template TInput
19
+ * Transformer input primitive type.
20
+ *
21
+ * @template TOutput
22
+ * Transformer output type.
23
+ *
24
+ * @param input
25
+ * Input value.
26
+ *
27
+ * @param index
28
+ * Index in sequence (0 for single transformation).
29
+ *
30
+ * @returns
31
+ * Output value.
32
+ */
33
+ export type TransformerCallback<TInput extends TransformerPrimitive, TOutput> = (input: TInput, index: number) => TOutput;
34
+ /**
35
+ * Transformer output, based on transformer input:
36
+ *
37
+ * - If type TTransformerInput is primitive, result is type TOutput.
38
+ * - If type TTransformerInput is Iterable, result is type Iterable<TOutput>.
39
+ *
40
+ * @template TTransformerInput
41
+ * Transformer input type.
42
+ *
43
+ * @template TOutput
44
+ * Output base type.
45
+ */
46
+ export type TransformerOutput<TTransformerInput extends TransformerInput<TransformerPrimitive>, TOutput> = TTransformerInput extends (TTransformerInput extends TransformerInput<infer TInput> ? TInput : never) ? TOutput : Iterable<TOutput>;
47
+ /**
48
+ * Transform an input iterable to an output iterable that applies a transformer callback to each value in the input.
49
+ *
50
+ * @param values
51
+ * Input values iterable.
52
+ *
53
+ * @param transformerCallback
54
+ * Callback to transform input value to output value.
55
+ *
56
+ * @returns
57
+ * Output values iterable.
58
+ */
59
+ export declare function transformIterable<TInput extends TransformerPrimitive, TOutput>(values: Iterable<TInput>, transformerCallback: TransformerCallback<TInput, TOutput>): Iterable<TOutput>;
60
+ /**
61
+ * Transformer that transforms values in a numeric domain to values in a range equal to the domain or to another range
62
+ * defined by a callback function. In other words, the domain determines valid input values and, without a callback, the
63
+ * range of valid output values.
64
+ *
65
+ * The concept is similar to {@link https://en.wikipedia.org/wiki/Format-preserving_encryption | format-preserving
66
+ * encryption}, where input values within a specified domain (e.g., {@link
67
+ * https://en.wikipedia.org/wiki/Payment_card_number | payment card numbers} ranging from 8-19 digits) are transformed
68
+ * into values in the same domain, typically for storage in a database where the data type and length are already fixed
69
+ * and exfiltration of the data can have significant repercussions.
70
+ *
71
+ * Two subclasses are supported directly by this class: {@link IdentityTransformer} (which operates based on a domain
72
+ * only) and {@link EncryptionTransformer} (which operates based on a domain and a tweak). If an application is expected
73
+ * to make repeated use of a transformer with the same domain and (optional) tweak and can't manage the transformer
74
+ * object, an in-memory cache is available via the {@link get} method. Properties in {@link IdentityTransformer} and
75
+ * {@link EncryptionTransformer} are read-only once constructed, so there is no issue with their shared use.
76
+ */
77
+ export declare abstract class Transformer {
78
+ /**
79
+ * Transformers cache, mapping a domain to another map, which maps an optional tweak to a transformer.
80
+ */
81
+ private static readonly TRANSFORMER_MAPS_MAP;
82
+ /**
83
+ * Domain.
84
+ */
85
+ private readonly _domain;
86
+ /**
87
+ * Constructor.
88
+ *
89
+ * @param domain
90
+ * Domain.
91
+ */
92
+ constructor(domain: number | bigint);
93
+ /**
94
+ * Get a transformer, constructing it if necessary. The type returned is {@link IdentityTransformer} if tweak is
95
+ * undefined, {@link EncryptionTransformer} if tweak is defined. Note that although an {@link EncryptionTransformer}
96
+ * with a zero tweak operates as an {@link IdentityTransformer}, {@link EncryptionTransformer} is still the type
97
+ * returned if a zero tweak is explicitly specified.
98
+ *
99
+ * @param domain
100
+ * Domain.
101
+ *
102
+ * @param tweak
103
+ * Tweak.
104
+ *
105
+ * @returns
106
+ * {@link IdentityTransformer} if tweak is undefined, {@link EncryptionTransformer} if tweak is defined.
107
+ */
108
+ static get(domain: number | bigint, tweak?: number | bigint): Transformer;
109
+ /**
110
+ * Get the domain.
111
+ */
112
+ get domain(): bigint;
113
+ /**
114
+ * Validate that a value is within the domain.
115
+ *
116
+ * @param value
117
+ * Value.
118
+ */
119
+ private validate;
120
+ /**
121
+ * Do the work of transforming a value forward.
122
+ *
123
+ * @param value
124
+ * Value.
125
+ *
126
+ * @returns
127
+ * Transformed value.
128
+ */
129
+ protected abstract doForward(value: bigint): bigint;
130
+ /**
131
+ * Validate that a value is within the domain and do the work of transforming it forward.
132
+ *
133
+ * @param value
134
+ * Value.
135
+ *
136
+ * @returns
137
+ * Transformed value.
138
+ */
139
+ private validateDoForward;
140
+ /**
141
+ * Validate that a value is within the domain, do the work of transforming it forward, and apply a callback.
142
+ *
143
+ * @param transformerCallback
144
+ * Called after each value is transformed to convert it to its final value.
145
+ *
146
+ * @param value
147
+ * Value.
148
+ *
149
+ * @param index
150
+ * Index in sequence (0 for single transformation).
151
+ *
152
+ * @returns
153
+ * Transformed value.
154
+ */
155
+ private validateDoForwardCallback;
156
+ /**
157
+ * Transform value(s) forward.
158
+ *
159
+ * @template TTransformerInput
160
+ * Value(s) input type.
161
+ *
162
+ * @param valueOrValues
163
+ * Value(s). If this is an instance of {@link Sequence}, the minimum and maximum values are validated prior to
164
+ * transformation. Otherwise, the individual value(s) is/are validated at the time of transformation.
165
+ *
166
+ * @returns
167
+ * Transformed value(s).
168
+ */
169
+ forward<TTransformerInput extends TransformerInput<number | bigint>>(valueOrValues: TTransformerInput): TransformerOutput<TTransformerInput, bigint>;
170
+ /**
171
+ * Transform value(s) forward, optionally applying a transformation.
172
+ *
173
+ * @template TTransformerInput
174
+ * Value(s) input type.
175
+ *
176
+ * @template TOutput
177
+ * Transformation callback output type.
178
+ *
179
+ * @param valueOrValues
180
+ * Value(s). If this is an instance of {@link Sequence}, the minimum and maximum values are validated prior to
181
+ * transformation. Otherwise, the individual value(s) is/are validated at the time of transformation.
182
+ *
183
+ * @param transformerCallback
184
+ * Called after each value is transformed to convert it to its final value.
185
+ *
186
+ * @returns
187
+ * Transformed value(s).
188
+ */
189
+ forward<TTransformerInput extends TransformerInput<number | bigint>, TOutput>(valueOrValues: TTransformerInput, transformerCallback: TransformerCallback<bigint, TOutput>): TransformerOutput<TTransformerInput, TOutput>;
190
+ /**
191
+ * Do the work of transforming a value in reverse.
192
+ *
193
+ * @param transformedValue
194
+ * Transformed value.
195
+ *
196
+ * @returns
197
+ * Value.
198
+ */
199
+ protected abstract doReverse(transformedValue: bigint): bigint;
200
+ /**
201
+ * Transform a value in reverse.
202
+ *
203
+ * @param transformedValue
204
+ * Transformed value.
205
+ *
206
+ * @returns
207
+ * Value.
208
+ */
209
+ reverse(transformedValue: number | bigint): bigint;
210
+ }
211
+ /**
212
+ * Identity transformer. Values are transformed to themselves.
213
+ */
214
+ export declare class IdentityTransformer extends Transformer {
215
+ /**
216
+ * @inheritDoc
217
+ */
218
+ protected doForward(value: bigint): bigint;
219
+ /**
220
+ * @inheritDoc
221
+ */
222
+ protected doReverse(transformedValue: bigint): bigint;
223
+ }
224
+ /**
225
+ * Encryption transformer. Values are transformed using repeated shuffle and xor operations, similar to those found in
226
+ * many cryptography algorithms, particularly AES. While sufficient for obfuscation of numeric sequences (e.g., serial
227
+ * number generation, below), if true format-preserving encryption is required, a more robust algorithm such as
228
+ * {@link https://doi.org/10.6028/NIST.SP.800-38Gr1-draft | FF1} is recommended. Furthermore, no work has been done to
229
+ * mitigate {@link https://timing.attacks.cr.yp.to/index.html | timing attacks} for key detection.
230
+ *
231
+ * The purpose of the encryption transformer is to generate pseudo-random values in a deterministic manner to obscure
232
+ * the sequence of values generated over time. A typical example is for serial number generation, where knowledge of the
233
+ * sequence can infer production volumes (e.g., serial number 1000 implies that at least 1,000 units have been
234
+ * manufactured) or can be used in counterfeiting (e.g., a counterfeiter can generate serial numbers 1001, 1002, ...
235
+ * with reasonable confidence that they would be valid if queried).
236
+ *
237
+ * The domain and the tweak together determine the encryption key, which in turn determines the number of rounds of
238
+ * shuffle and xor operations. The minimum number of rounds is 4, except where the domain is less than or equal to 256,
239
+ * which results in single-byte operations. To ensure that the operations are effective for single-byte domains, the
240
+ * number of rounds is 1 and only the xor operation is applied (shuffling a single byte is an identity operation).
241
+ *
242
+ * Another exception is when there is a tweak value of 0; this results in identity operations where the output value is
243
+ * identical to the input value, as no shuffle or xor takes place.
244
+ */
245
+ export declare class EncryptionTransformer extends Transformer {
246
+ /**
247
+ * Individual bits, pre-calculated for performance.
248
+ */
249
+ private static readonly BITS;
250
+ /**
251
+ * Inverse individual bits, pre-calculated for performance.
252
+ */
253
+ private static readonly INVERSE_BITS;
254
+ /**
255
+ * Number of bytes covered by the domain.
256
+ */
257
+ private readonly _domainBytes;
258
+ /**
259
+ * Xor bytes array generated from the domain and tweak.
260
+ */
261
+ private readonly _xorBytes;
262
+ /**
263
+ * Bits array generated from the domain and tweak.
264
+ */
265
+ private readonly _bits;
266
+ /**
267
+ * Inverse bits array generated from the domain and tweak.
268
+ */
269
+ private readonly _inverseBits;
270
+ /**
271
+ * Number of rounds (length of arrays) generated from the domain and tweak.
272
+ */
273
+ private readonly _rounds;
274
+ /**
275
+ * Constructor.
276
+ *
277
+ * @param domain
278
+ * Domain.
279
+ *
280
+ * @param tweak
281
+ * Tweak.
282
+ */
283
+ constructor(domain: number | bigint, tweak: number | bigint);
284
+ /**
285
+ * Convert a value to a byte array big enough to handle the entire domain.
286
+ *
287
+ * @param value
288
+ * Value.
289
+ *
290
+ * @returns
291
+ * Big-endian byte array equivalent to the value.
292
+ */
293
+ private valueToBytes;
294
+ /**
295
+ * Convert a byte array to a value.
296
+ *
297
+ * @param bytes
298
+ * Big-endian byte array equivalent to the value.
299
+ *
300
+ * @returns
301
+ * Value.
302
+ */
303
+ private static bytesToValue;
304
+ /**
305
+ * Shuffle a byte array.
306
+ *
307
+ * The input array to the forward operation (output from the reverse operation) is `bytes` and the output array from
308
+ * the forward operation (input to the reverse operation) is `bytes'`.
309
+ *
310
+ * The shuffle operation starts by testing the bit at `bits[round]` for each `byte` in `bytes`. The indexes for all
311
+ * bytes with that bit set are put into one array (`shuffleIndexes1`) and the rest are put into another
312
+ * (`shuffleIndexes0`). The two arrays are concatenated and used to shuffle the input array, using their values
313
+ * (`shuffleIndex`) and the indexes of those values (`index`) in the concatenated array.
314
+ *
315
+ * Forward shuffling moves the entry at `shuffleIndex` to the `index` position.
316
+ *
317
+ * Reverse shuffling moves the entry at `index` to the `shuffleIndex` position.
318
+ *
319
+ * As each byte is moved, the bit at `bits[round]` is preserved in its original position. This ensures that the
320
+ * process is reversible.
321
+ *
322
+ * @param bytes
323
+ * Byte array.
324
+ *
325
+ * @param round
326
+ * Round number.
327
+ *
328
+ * @param forward
329
+ * True if operating forward (encrypting), false if operating in reverse (decrypting).
330
+ *
331
+ * @returns
332
+ * Shuffled byte array.
333
+ */
334
+ private shuffle;
335
+ /**
336
+ * Xor a byte array.
337
+ *
338
+ * The input array to the forward operation (output from the reverse operation) is `bytes` and the output array from
339
+ * the forward operation (input to the reverse operation) is `bytes'`.
340
+ *
341
+ * Forward:
342
+ * - `bytes'[0] = bytes[0] ^ xorBytes[round]`
343
+ * - `bytes'[1] = bytes[1] ^ bytes'[0]`
344
+ * - `bytes'[2] = bytes[2] ^ bytes'[1]`
345
+ * - `...`
346
+ * - `bytes'[domainBytes - 1] = bytes[domainBytes - 1] ^ bytes'[domainBytes - 2]`
347
+ *
348
+ * Reverse:
349
+ * - `bytes[0] = bytes'[0] ^ xorBytes[round]`
350
+ * - `bytes[1] = bytes'[1] ^ bytes'[0]`
351
+ * - `bytes[2] = bytes'[2] ^ bytes'[1]`
352
+ * - `...`
353
+ * - `bytes[domainBytes - 1] = bytes'[domainBytes - 1] ^ bytes'[domainBytes - 2]`
354
+ *
355
+ * @param bytes
356
+ * Byte array.
357
+ *
358
+ * @param round
359
+ * Round number.
360
+ *
361
+ * @param forward
362
+ * True if operating forward (encrypting), false if operating in reverse (decrypting).
363
+ *
364
+ * @returns
365
+ * Xored byte array.
366
+ */
367
+ private xor;
368
+ /**
369
+ * @inheritDoc
370
+ */
371
+ protected doForward(value: bigint): bigint;
372
+ /**
373
+ * @inheritDoc
374
+ */
375
+ protected doReverse(transformedValue: bigint): bigint;
376
+ }
377
+ //# sourceMappingURL=transformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../src/transformer.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,CAAC,MAAM,SAAS,oBAAoB,IAAI,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAE9F;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,mBAAmB,CAAC,MAAM,SAAS,oBAAoB,EAAE,OAAO,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;AAE1H;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,CAAC,iBAAiB,SAAS,gBAAgB,CAAC,oBAAoB,CAAC,EAAE,OAAO,IACnG,iBAAiB,SAAS,CAAC,iBAAiB,SAAS,gBAAgB,CAAC,MAAM,MAAM,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,GAAG,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;AAExI;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,SAAS,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAgBtL;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,8BAAs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