@tonysamperi/ts-mapi-core 1.8.0 → 2.0.0-beta.1
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/dist/cjs/dynamo.cjs +2 -0
- package/dist/cjs/dynamo.cjs.map +1 -0
- package/dist/cjs/firebase.cjs +2 -0
- package/dist/cjs/firebase.cjs.map +1 -0
- package/dist/cjs/firebase.d.cts +61 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +8 -291
- package/dist/cjs/rxjs.cjs +2 -0
- package/dist/cjs/rxjs.cjs.map +1 -0
- package/dist/cjs/rxjs.d.cts +106 -0
- package/dist/{esm/shared/utils/cache/smp-abstract-cache-strategy.class.d.ts → cjs/smp-cached-value.interface-BdPg-J7L.d.cts} +6 -1
- package/dist/cjs/smp-generic-response-base.interface-D0jHrkjw.d.cts +27 -0
- package/dist/cjs/smp-social-sign-in-ux-modes.enum-Cw9H3EqT.d.cts +12 -0
- package/dist/cjs/zod.cjs +2 -0
- package/dist/cjs/zod.cjs.map +1 -0
- package/dist/cjs/zod.d.cts +45 -0
- package/dist/esm/chunk-DIVAYUSN.js +1 -0
- package/dist/esm/chunk-VBEMFJKM.js +1 -0
- package/dist/esm/dynamo.d.ts +39 -0
- package/dist/esm/{chunk-XF457SYA.js → dynamo.js} +1 -1
- package/dist/esm/{services/firebase/smp-firebase.service.d.ts → firebase.d.ts} +9 -4
- package/dist/esm/firebase.js +1 -0
- package/dist/esm/index.d.ts +999 -62
- package/dist/esm/index.js +1 -1
- package/dist/esm/rxjs.d.ts +106 -0
- package/dist/esm/rxjs.js +1 -0
- package/dist/esm/smp-cached-value.interface-BdPg-J7L.d.ts +21 -0
- package/dist/esm/smp-generic-response-base.interface-D0jHrkjw.d.ts +27 -0
- package/dist/esm/smp-social-sign-in-ux-modes.enum-Cw9H3EqT.d.ts +12 -0
- package/dist/esm/zod.d.ts +45 -0
- package/dist/esm/zod.js +1 -0
- package/package.json +60 -1
- package/dist/esm/chunk-2JBVVJ2E.js +0 -0
- package/dist/esm/chunk-2UDNZC5A.js +0 -1
- package/dist/esm/chunk-2YYH6VGI.js +0 -1
- package/dist/esm/chunk-3HRZ6R3F.js +0 -1
- package/dist/esm/chunk-4LYXZUNL.js +0 -0
- package/dist/esm/chunk-4TNTWTMN.js +0 -1
- package/dist/esm/chunk-4UTF5FWK.js +0 -1
- package/dist/esm/chunk-553CS7VH.js +0 -0
- package/dist/esm/chunk-5VCNTUI6.js +0 -1
- package/dist/esm/chunk-5WULAY6L.js +0 -1
- package/dist/esm/chunk-7CWGJ3NF.js +0 -1
- package/dist/esm/chunk-AV6X4R7W.js +0 -0
- package/dist/esm/chunk-BHFFGFHY.js +0 -0
- package/dist/esm/chunk-CFV5G67M.js +0 -1
- package/dist/esm/chunk-D2XOH6K4.js +0 -1
- package/dist/esm/chunk-D66G2KIE.js +0 -0
- package/dist/esm/chunk-DADFHUII.js +0 -1
- package/dist/esm/chunk-DGUMFWCQ.js +0 -0
- package/dist/esm/chunk-DOKJQH4K.js +0 -1
- package/dist/esm/chunk-EB55SS67.js +0 -0
- package/dist/esm/chunk-ELQKTQ6W.js +0 -0
- package/dist/esm/chunk-ET5LYR3A.js +0 -1
- package/dist/esm/chunk-FLTR4ZY6.js +0 -1
- package/dist/esm/chunk-FTXCYY5S.js +0 -1
- package/dist/esm/chunk-G7PUYG2K.js +0 -1
- package/dist/esm/chunk-GRXWCGMW.js +0 -1
- package/dist/esm/chunk-HM7F3YYW.js +0 -0
- package/dist/esm/chunk-HOM5S5W3.js +0 -0
- package/dist/esm/chunk-I3CNDIWD.js +0 -0
- package/dist/esm/chunk-JXSMI3MI.js +0 -1
- package/dist/esm/chunk-L7KNFRNV.js +0 -1
- package/dist/esm/chunk-LD5COSFG.js +0 -1
- package/dist/esm/chunk-MLBCWEB4.js +0 -1
- package/dist/esm/chunk-MRKAFTDG.js +0 -1
- package/dist/esm/chunk-NQICKEAS.js +0 -0
- package/dist/esm/chunk-O7TJDNO6.js +0 -0
- package/dist/esm/chunk-OUSY7GMI.js +0 -1
- package/dist/esm/chunk-PKEW426R.js +0 -0
- package/dist/esm/chunk-Q77KUWBZ.js +0 -0
- package/dist/esm/chunk-QK6DPGU6.js +0 -1
- package/dist/esm/chunk-QPKVVZUA.js +0 -1
- package/dist/esm/chunk-QRCMHI3B.js +0 -1
- package/dist/esm/chunk-QW43DOPY.js +0 -1
- package/dist/esm/chunk-QWZP25QT.js +0 -1
- package/dist/esm/chunk-R6VG4656.js +0 -1
- package/dist/esm/chunk-RAJGA43T.js +0 -1
- package/dist/esm/chunk-RAVJJJYE.js +0 -1
- package/dist/esm/chunk-RGLXAD7B.js +0 -1
- package/dist/esm/chunk-RJBWCWAE.js +0 -1
- package/dist/esm/chunk-SDQLEPBS.js +0 -0
- package/dist/esm/chunk-SJOEBOGG.js +0 -1
- package/dist/esm/chunk-SPPRTVHH.js +0 -1
- package/dist/esm/chunk-STU5GUNH.js +0 -1
- package/dist/esm/chunk-SXISZIFJ.js +0 -0
- package/dist/esm/chunk-SZM4WHQJ.js +0 -0
- package/dist/esm/chunk-TGY6ZSQU.js +0 -1
- package/dist/esm/chunk-U5DBFRKV.js +0 -0
- package/dist/esm/chunk-V6NBH54E.js +0 -1
- package/dist/esm/chunk-VHMV4QQT.js +0 -1
- package/dist/esm/chunk-WTEJYEK2.js +0 -0
- package/dist/esm/chunk-WTLVPDI2.js +0 -1
- package/dist/esm/chunk-XZEYUIQ6.js +0 -1
- package/dist/esm/chunk-YEQJ4M3P.js +0 -1
- package/dist/esm/chunk-ZKODHJSY.js +0 -1
- package/dist/esm/chunk-ZTDFA2UA.js +0 -1
- package/dist/esm/chunk-ZYPNYJVE.js +0 -0
- package/dist/esm/services/firebase/index.d.ts +0 -7
- package/dist/esm/services/firebase/index.js +0 -1
- package/dist/esm/services/firebase/smp-firebase-service-config.interface.d.ts +0 -12
- package/dist/esm/services/firebase/smp-firebase-service-config.interface.js +0 -0
- package/dist/esm/services/firebase/smp-firebase.service.js +0 -1
- package/dist/esm/services/http/index.d.ts +0 -12
- package/dist/esm/services/http/index.js +0 -1
- package/dist/esm/services/http/smp-dynamic-fetch-return.type.d.ts +0 -3
- package/dist/esm/services/http/smp-dynamic-fetch-return.type.js +0 -0
- package/dist/esm/services/http/smp-http-config.interface.d.ts +0 -16
- package/dist/esm/services/http/smp-http-config.interface.js +0 -1
- package/dist/esm/services/http/smp-http-session-storage-cache.class.d.ts +0 -11
- package/dist/esm/services/http/smp-http-session-storage-cache.class.js +0 -1
- package/dist/esm/services/http/smp-http-status-code.enum.d.ts +0 -70
- package/dist/esm/services/http/smp-http-status-code.enum.js +0 -1
- package/dist/esm/services/http/smp-http.service.d.ts +0 -46
- package/dist/esm/services/http/smp-http.service.js +0 -1
- package/dist/esm/services/index.d.ts +0 -22
- package/dist/esm/services/index.js +0 -1
- package/dist/esm/services/smp-dynamo.service.js +0 -1
- package/dist/esm/shared/api/index.d.ts +0 -11
- package/dist/esm/shared/api/index.js +0 -1
- package/dist/esm/shared/api/smp-api-common-utils.class.d.ts +0 -15
- package/dist/esm/shared/api/smp-api-common-utils.class.js +0 -1
- package/dist/esm/shared/api/smp-error-response-create-opts.interface.d.ts +0 -13
- package/dist/esm/shared/api/smp-error-response-create-opts.interface.js +0 -1
- package/dist/esm/shared/api/smp-error-response.class.d.ts +0 -25
- package/dist/esm/shared/api/smp-error-response.class.js +0 -1
- package/dist/esm/shared/api/smp-generic-response-base.interface.d.ts +0 -9
- package/dist/esm/shared/api/smp-generic-response-base.interface.js +0 -1
- package/dist/esm/shared/api/smp-generic-response.class.d.ts +0 -20
- package/dist/esm/shared/api/smp-generic-response.class.js +0 -1
- package/dist/esm/shared/api/smp-healtz.const.d.ts +0 -5
- package/dist/esm/shared/api/smp-healtz.const.js +0 -1
- package/dist/esm/shared/api/smp-response-message-base.interface.d.ts +0 -8
- package/dist/esm/shared/api/smp-response-message-base.interface.js +0 -1
- package/dist/esm/shared/api/smp-response-message-types.enum.d.ts +0 -8
- package/dist/esm/shared/api/smp-response-message-types.enum.js +0 -1
- package/dist/esm/shared/api/smp-response-message.class.d.ts +0 -13
- package/dist/esm/shared/api/smp-response-message.class.js +0 -1
- package/dist/esm/shared/api/smp-rest-verbs.enum.d.ts +0 -9
- package/dist/esm/shared/api/smp-rest-verbs.enum.js +0 -1
- package/dist/esm/shared/common/index.d.ts +0 -6
- package/dist/esm/shared/common/index.js +0 -1
- package/dist/esm/shared/common/smp-base-jwt-token-plain.interface.d.ts +0 -7
- package/dist/esm/shared/common/smp-base-jwt-token-plain.interface.js +0 -1
- package/dist/esm/shared/common/smp-base-jwt-token.class.d.ts +0 -14
- package/dist/esm/shared/common/smp-base-jwt-token.class.js +0 -1
- package/dist/esm/shared/common/smp-generic-constructor.type.d.ts +0 -3
- package/dist/esm/shared/common/smp-generic-constructor.type.js +0 -1
- package/dist/esm/shared/common/smp-primitive.type.d.ts +0 -3
- package/dist/esm/shared/common/smp-primitive.type.js +0 -1
- package/dist/esm/shared/common/smp-social-sign-in-keys.enum.d.ts +0 -7
- package/dist/esm/shared/common/smp-social-sign-in-keys.enum.js +0 -1
- package/dist/esm/shared/common/smp-social-sign-in-ux-modes.enum.d.ts +0 -6
- package/dist/esm/shared/common/smp-social-sign-in-ux-modes.enum.js +0 -1
- package/dist/esm/shared/crypto/index.d.ts +0 -3
- package/dist/esm/shared/crypto/index.js +0 -1
- package/dist/esm/shared/crypto/smp-aes-crypt.class.d.ts +0 -1
- package/dist/esm/shared/crypto/smp-aes-crypt.class.js +0 -1
- package/dist/esm/shared/crypto/smp-crypto.class.d.ts +0 -10
- package/dist/esm/shared/crypto/smp-crypto.class.js +0 -1
- package/dist/esm/shared/crypto/smp-secure-code.class.d.ts +0 -20
- package/dist/esm/shared/crypto/smp-secure-code.class.js +0 -1
- package/dist/esm/shared/firebase/index.d.ts +0 -1
- package/dist/esm/shared/firebase/index.js +0 -1
- package/dist/esm/shared/firebase/smp-firebase-errors.enum.d.ts +0 -14
- package/dist/esm/shared/firebase/smp-firebase-errors.enum.js +0 -1
- package/dist/esm/shared/giftcard/index.d.ts +0 -8
- package/dist/esm/shared/giftcard/index.js +0 -1
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-config.interface.d.ts +0 -11
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-config.interface.js +0 -1
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-hash-strategies.enum.d.ts +0 -8
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-hash-strategies.enum.js +0 -1
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-ops.enum.d.ts +0 -16
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-ops.enum.js +0 -1
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-plain.interface.d.ts +0 -8
- package/dist/esm/shared/giftcard/smp-giftcard-transaction-plain.interface.js +0 -1
- package/dist/esm/shared/giftcard/smp-giftcard-transaction.class.d.ts +0 -56
- package/dist/esm/shared/giftcard/smp-giftcard-transaction.class.js +0 -1
- package/dist/esm/shared/marketing-cloud/index.d.ts +0 -2
- package/dist/esm/shared/marketing-cloud/index.js +0 -1
- package/dist/esm/shared/marketing-cloud/smp-marketing-cloud-validation-response.interface.d.ts +0 -14
- package/dist/esm/shared/marketing-cloud/smp-marketing-cloud-validation-response.interface.js +0 -1
- package/dist/esm/shared/marketing-cloud/smp-marketing-cloud-validators.enum.d.ts +0 -7
- package/dist/esm/shared/marketing-cloud/smp-marketing-cloud-validators.enum.js +0 -1
- package/dist/esm/shared/rxjs/index.d.ts +0 -10
- package/dist/esm/shared/rxjs/index.js +0 -1
- package/dist/esm/shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.d.ts +0 -17
- package/dist/esm/shared/rxjs/smp-abstract-rxjs-ttl-cache-strategy.class.js +0 -1
- package/dist/esm/shared/rxjs/smp-rxjs-catch-only.function.d.ts +0 -5
- package/dist/esm/shared/rxjs/smp-rxjs-catch-only.function.js +0 -1
- package/dist/esm/shared/rxjs/smp-rxjs-in-memory-cache.class.d.ts +0 -15
- package/dist/esm/shared/rxjs/smp-rxjs-in-memory-cache.class.js +0 -1
- package/dist/esm/shared/rxjs/smp-rxjs-queue.function.d.ts +0 -11
- package/dist/esm/shared/rxjs/smp-rxjs-queue.function.js +0 -1
- package/dist/esm/shared/rxjs/smp-rxjs-sequence.function.d.ts +0 -12
- package/dist/esm/shared/rxjs/smp-rxjs-sequence.function.js +0 -1
- package/dist/esm/shared/rxjs/smp-rxjs-throw-if-empty.function.d.ts +0 -38
- package/dist/esm/shared/rxjs/smp-rxjs-throw-if-empty.function.js +0 -1
- package/dist/esm/shared/rxjs/smp-rxjs-throw-on-condition.function.d.ts +0 -30
- package/dist/esm/shared/rxjs/smp-rxjs-throw-on-condition.function.js +0 -1
- package/dist/esm/shared/utils/cache/index.d.ts +0 -7
- package/dist/esm/shared/utils/cache/index.js +0 -1
- package/dist/esm/shared/utils/cache/smp-abstract-cache-strategy.class.js +0 -1
- package/dist/esm/shared/utils/cache/smp-abstract-ttl-cache-strategy.class.d.ts +0 -17
- package/dist/esm/shared/utils/cache/smp-abstract-ttl-cache-strategy.class.js +0 -1
- package/dist/esm/shared/utils/cache/smp-browser-cache.class.d.ts +0 -16
- package/dist/esm/shared/utils/cache/smp-browser-cache.class.js +0 -1
- package/dist/esm/shared/utils/cache/smp-cached-value.interface.d.ts +0 -6
- package/dist/esm/shared/utils/cache/smp-cached-value.interface.js +0 -1
- package/dist/esm/shared/utils/cache/smp-in-memory-cache.class.d.ts +0 -15
- package/dist/esm/shared/utils/cache/smp-in-memory-cache.class.js +0 -1
- package/dist/esm/shared/utils/cache/smp-is-smp-cached-value.function.d.ts +0 -9
- package/dist/esm/shared/utils/cache/smp-is-smp-cached-value.function.js +0 -1
- package/dist/esm/shared/utils/index.d.ts +0 -15
- package/dist/esm/shared/utils/index.js +0 -1
- package/dist/esm/shared/utils/smp-apply-mixin.function.d.ts +0 -5
- package/dist/esm/shared/utils/smp-apply-mixin.function.js +0 -1
- package/dist/esm/shared/utils/smp-ascii-words.function.d.ts +0 -3
- package/dist/esm/shared/utils/smp-ascii-words.function.js +0 -1
- package/dist/esm/shared/utils/smp-common-utils.class.d.ts +0 -101
- package/dist/esm/shared/utils/smp-common-utils.class.js +0 -1
- package/dist/esm/shared/utils/smp-filter-exception.class.d.ts +0 -7
- package/dist/esm/shared/utils/smp-filter-exception.class.js +0 -1
- package/dist/esm/shared/utils/smp-noop.function.d.ts +0 -1
- package/dist/esm/shared/utils/smp-noop.function.js +0 -1
- package/dist/esm/shared/utils/smp-regular-expressions.class.d.ts +0 -16
- package/dist/esm/shared/utils/smp-regular-expressions.class.js +0 -1
- package/dist/esm/shared/utils/smp-sid.class.d.ts +0 -18
- package/dist/esm/shared/utils/smp-sid.class.js +0 -1
- package/dist/esm/shared/utils/smp-unicode-words.class.d.ts +0 -15
- package/dist/esm/shared/utils/smp-unicode-words.class.js +0 -1
- package/dist/esm/shared/zod/index.d.ts +0 -3
- package/dist/esm/shared/zod/index.js +0 -1
- package/dist/esm/shared/zod/smp-zod-date-time.definition.d.ts +0 -28
- package/dist/esm/shared/zod/smp-zod-date-time.definition.js +0 -1
- package/dist/esm/smp-aes-crypt.class-CI82T7GV.d.ts +0 -470
- /package/dist/{esm/services/smp-dynamo.service.d.ts → cjs/dynamo.d.cts} +0 -0
- /package/dist/esm/{chunk-QYDMV6LH.js → chunk-F3OJMKBL.js} +0 -0
|
@@ -1,470 +0,0 @@
|
|
|
1
|
-
declare class WordArray {
|
|
2
|
-
sigBytes: number;
|
|
3
|
-
words: number[];
|
|
4
|
-
/**
|
|
5
|
-
* Initializes a newly created word array.
|
|
6
|
-
*
|
|
7
|
-
* @param words (Optional) An array of 32-bit words.
|
|
8
|
-
* @param sigBytes (Optional) The number of significant bytes in the words.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
*
|
|
12
|
-
* let wordArray = new WordArray();
|
|
13
|
-
* let wordArray = new WordArray([0x00010203, 0x04050607]);
|
|
14
|
-
* let wordArray = new WordArray([0x00010203, 0x04050607], 6);
|
|
15
|
-
*/
|
|
16
|
-
constructor(words?: number[], sigBytes?: number);
|
|
17
|
-
/**
|
|
18
|
-
* Creates a word array filled with random bytes.
|
|
19
|
-
*
|
|
20
|
-
* @param nBytes The number of random bytes to generate.
|
|
21
|
-
*
|
|
22
|
-
* @return The random word array.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
*
|
|
26
|
-
* let wordArray = WordArray.random(16);
|
|
27
|
-
*/
|
|
28
|
-
static random(nBytes: number): WordArray;
|
|
29
|
-
/**
|
|
30
|
-
* Removes insignificant bits.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
*
|
|
34
|
-
* wordArray.clamp();
|
|
35
|
-
*/
|
|
36
|
-
clamp(): void;
|
|
37
|
-
/**
|
|
38
|
-
* Creates a copy of this word array.
|
|
39
|
-
*
|
|
40
|
-
* @return The clone.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
*
|
|
44
|
-
* let clone = wordArray.clone();
|
|
45
|
-
*/
|
|
46
|
-
clone(): WordArray;
|
|
47
|
-
/**
|
|
48
|
-
* Concatenates a word array to this word array.
|
|
49
|
-
*
|
|
50
|
-
* @param wordArray The word array to append.
|
|
51
|
-
*
|
|
52
|
-
* @return This word array.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
*
|
|
56
|
-
* wordArray1.concat(wordArray2);
|
|
57
|
-
*/
|
|
58
|
-
concat(wordArray: WordArray): WordArray;
|
|
59
|
-
/**
|
|
60
|
-
* Converts this word array to a string.
|
|
61
|
-
*
|
|
62
|
-
* @param encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
|
|
63
|
-
*
|
|
64
|
-
* @return The stringified word array.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
*
|
|
68
|
-
* let string = wordArray + '';
|
|
69
|
-
* let string = wordArray.toString();
|
|
70
|
-
* let string = wordArray.toString(CryptoJS.enc.Utf8);
|
|
71
|
-
*/
|
|
72
|
-
toString<T extends {
|
|
73
|
-
stringify: (arg: WordArray) => string;
|
|
74
|
-
}>(encoder?: T): string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
declare abstract class BlockCipherModeAlgorithm {
|
|
78
|
-
__creator: ((cipher: BlockCipher, iv: number[]) => BlockCipherMode) | undefined;
|
|
79
|
-
protected _cipher: BlockCipher;
|
|
80
|
-
protected _iv: number[] | undefined;
|
|
81
|
-
constructor(cipher: BlockCipher, iv: number[]);
|
|
82
|
-
abstract processBlock(words: number[], offset: number): void;
|
|
83
|
-
/**
|
|
84
|
-
* Initializes a newly created mode.
|
|
85
|
-
*
|
|
86
|
-
* @param cipher A block cipher instance.
|
|
87
|
-
* @param iv The IV words.
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
*
|
|
91
|
-
* var mode = CBC.Encryptor.create(cipher, iv.words);
|
|
92
|
-
*/
|
|
93
|
-
init(cipher: BlockCipher, iv?: number[]): void;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
declare abstract class BlockCipherMode {
|
|
97
|
-
static Decryptor: any;
|
|
98
|
-
static Encryptor: any;
|
|
99
|
-
/**
|
|
100
|
-
* Creates this mode for decryption.
|
|
101
|
-
*
|
|
102
|
-
* @param cipher A block cipher instance.
|
|
103
|
-
* @param iv The IV words.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
*
|
|
107
|
-
* const mode = CBC.createDecryptor(cipher, iv.words);
|
|
108
|
-
*/
|
|
109
|
-
static createDecryptor(cipher: BlockCipher, iv: number[]): BlockCipherModeAlgorithm;
|
|
110
|
-
/**
|
|
111
|
-
* Creates this mode for encryption.
|
|
112
|
-
*
|
|
113
|
-
* @param cipher A block cipher instance.
|
|
114
|
-
* @param iv The IV words.
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
*
|
|
118
|
-
* var mode = CBC.createEncryptor(cipher, iv.words);
|
|
119
|
-
*/
|
|
120
|
-
static createEncryptor(cipher: BlockCipher, iv: number[]): BlockCipherModeAlgorithm;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
declare abstract class AbstractPadding {
|
|
124
|
-
static pad: (data: WordArray, blockSize: number) => void;
|
|
125
|
-
static unpad: (data: WordArray) => void;
|
|
126
|
-
}
|
|
127
|
-
type Padding = typeof AbstractPadding;
|
|
128
|
-
|
|
129
|
-
declare class CipherParams {
|
|
130
|
-
algorithm?: typeof Cipher;
|
|
131
|
-
blockSize?: number;
|
|
132
|
-
ciphertext?: WordArray;
|
|
133
|
-
formatter?: Formatter;
|
|
134
|
-
iv?: WordArray;
|
|
135
|
-
key?: WordArray | string;
|
|
136
|
-
mode?: typeof BlockCipherMode;
|
|
137
|
-
padding?: Padding;
|
|
138
|
-
salt?: WordArray | string;
|
|
139
|
-
/**
|
|
140
|
-
* Initializes a newly created cipher params object.
|
|
141
|
-
*
|
|
142
|
-
* @param cipherParams An object with any of the possible cipher parameters.
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
*
|
|
146
|
-
* let cipherParams = CipherParams.create({
|
|
147
|
-
* ciphertext: ciphertextWordArray,
|
|
148
|
-
* key: keyWordArray,
|
|
149
|
-
* iv: ivWordArray,
|
|
150
|
-
* salt: saltWordArray,
|
|
151
|
-
* algorithm: AES,
|
|
152
|
-
* mode: CBC,
|
|
153
|
-
* padding: PKCS7,
|
|
154
|
-
* blockSize: 4,
|
|
155
|
-
* formatter: OpenSSLFormatter
|
|
156
|
-
* });
|
|
157
|
-
*/
|
|
158
|
-
constructor(cipherParams: Omit<CipherParams, "extend" | "toString">);
|
|
159
|
-
extend(additionalParams: CipherParams): CipherParams;
|
|
160
|
-
/**
|
|
161
|
-
* Converts this cipher params object to a string.
|
|
162
|
-
*
|
|
163
|
-
* @param formatter (Optional) The formatting strategy to use.
|
|
164
|
-
*
|
|
165
|
-
* @return The stringified cipher params.
|
|
166
|
-
*
|
|
167
|
-
* @throws Error If neither the formatter nor the default formatter is set.
|
|
168
|
-
*
|
|
169
|
-
* @example
|
|
170
|
-
*
|
|
171
|
-
* let string = cipherParams + '';
|
|
172
|
-
* let string = cipherParams.toString();
|
|
173
|
-
* let string = cipherParams.toString(CryptoJS.format.OpenSSL);
|
|
174
|
-
*/
|
|
175
|
-
toString(formatter?: Formatter): string;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
interface Formatter {
|
|
179
|
-
stringify: (cipherParams: CipherParams) => string;
|
|
180
|
-
parse: (paramsStr: string) => CipherParams;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
declare abstract class AbstractKDF {
|
|
184
|
-
static execute: (password: string, keySize: number, ivSize: number, salt?: WordArray | string) => CipherParams;
|
|
185
|
-
abstract compute?(password: WordArray | string, salt: WordArray | string): WordArray;
|
|
186
|
-
}
|
|
187
|
-
type KDF = typeof AbstractKDF;
|
|
188
|
-
|
|
189
|
-
interface BufferedBlockAlgorithmConfig {
|
|
190
|
-
blockSize?: number;
|
|
191
|
-
iv?: WordArray;
|
|
192
|
-
format?: Formatter;
|
|
193
|
-
kdf?: KDF;
|
|
194
|
-
mode?: typeof BlockCipherMode;
|
|
195
|
-
padding?: Padding;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
declare abstract class BufferedBlockAlgorithm {
|
|
199
|
-
cfg: BufferedBlockAlgorithmConfig;
|
|
200
|
-
protected _data: WordArray;
|
|
201
|
-
protected _minBufferSize: number;
|
|
202
|
-
protected _nDataBytes: number;
|
|
203
|
-
protected abstract _doProcessBlock(wordArray: number[], offset: number): void;
|
|
204
|
-
constructor(cfg?: BufferedBlockAlgorithmConfig);
|
|
205
|
-
/**
|
|
206
|
-
* Creates a copy of this object.
|
|
207
|
-
*
|
|
208
|
-
* @return The clone.
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
*
|
|
212
|
-
* let clone = bufferedBlockAlgorithm.clone();
|
|
213
|
-
*/
|
|
214
|
-
clone(): BufferedBlockAlgorithm;
|
|
215
|
-
/**
|
|
216
|
-
* Resets this block algorithm's data buffer to its initial state.
|
|
217
|
-
*
|
|
218
|
-
* @example
|
|
219
|
-
*
|
|
220
|
-
* bufferedBlockAlgorithm.reset();
|
|
221
|
-
*/
|
|
222
|
-
reset(): void;
|
|
223
|
-
/**
|
|
224
|
-
* Adds new data to this block algorithm's buffer.
|
|
225
|
-
*
|
|
226
|
-
* @param data The data to append. Strings are converted to a WordArray using UTF-8.
|
|
227
|
-
*
|
|
228
|
-
* @example
|
|
229
|
-
*
|
|
230
|
-
* bufferedBlockAlgorithm._append('data');
|
|
231
|
-
* bufferedBlockAlgorithm._append(wordArray);
|
|
232
|
-
*/
|
|
233
|
-
protected _append(data: string | WordArray): void;
|
|
234
|
-
/**
|
|
235
|
-
* Processes available data blocks.
|
|
236
|
-
*
|
|
237
|
-
* This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
|
|
238
|
-
*
|
|
239
|
-
* @param doFlush Whether all blocks and partial blocks should be processed.
|
|
240
|
-
*
|
|
241
|
-
* @return The processed data.
|
|
242
|
-
*
|
|
243
|
-
* @example
|
|
244
|
-
*
|
|
245
|
-
* let processedData = bufferedBlockAlgorithm._process();
|
|
246
|
-
* let processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
247
|
-
*/
|
|
248
|
-
protected _process(doFlush?: boolean): WordArray;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
declare class CipherHelper {
|
|
252
|
-
private readonly _cipher;
|
|
253
|
-
constructor(_cipher: typeof Cipher);
|
|
254
|
-
decrypt(ciphertext: CipherParams | string, key: WordArray | string, cfg?: BufferedBlockAlgorithmConfig): WordArray;
|
|
255
|
-
encrypt(message: WordArray | string, key: WordArray | string, cfg?: BufferedBlockAlgorithmConfig): CipherParams;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
declare abstract class Cipher extends BufferedBlockAlgorithm {
|
|
259
|
-
/**
|
|
260
|
-
* This cipher's IV size. Default: 4 (128 bits / 32 Bits)
|
|
261
|
-
*/
|
|
262
|
-
static ivSize: number;
|
|
263
|
-
/**
|
|
264
|
-
* This cipher's key size. Default: 4 (128 bits / 32 Bits)
|
|
265
|
-
*/
|
|
266
|
-
static keySize: number;
|
|
267
|
-
/**
|
|
268
|
-
* A constant representing decryption mode.
|
|
269
|
-
*/
|
|
270
|
-
protected static readonly _DEC_XFORM_MODE = 2;
|
|
271
|
-
/**
|
|
272
|
-
* A constant representing encryption mode.
|
|
273
|
-
*/
|
|
274
|
-
protected static readonly _ENC_XFORM_MODE = 1;
|
|
275
|
-
/**
|
|
276
|
-
* The key.
|
|
277
|
-
*/
|
|
278
|
-
protected _key: WordArray;
|
|
279
|
-
/**
|
|
280
|
-
* Either the encryption or decryption transformation mode constant.
|
|
281
|
-
*/
|
|
282
|
-
protected _xformMode: number;
|
|
283
|
-
/**
|
|
284
|
-
* Initializes a newly created cipher.
|
|
285
|
-
*
|
|
286
|
-
* @param xformMode Either the encryption or decryption transormation mode constant.
|
|
287
|
-
* @param key The key.
|
|
288
|
-
* @param cfg (Optional) The configuration options to use for this operation.
|
|
289
|
-
*
|
|
290
|
-
* @example
|
|
291
|
-
*
|
|
292
|
-
* let cipher = AES.create(AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
|
|
293
|
-
*/
|
|
294
|
-
constructor(xformMode: number, key: WordArray, cfg?: BufferedBlockAlgorithmConfig);
|
|
295
|
-
/**
|
|
296
|
-
* Creates shortcut functions to a cipher's object interface.
|
|
297
|
-
*
|
|
298
|
-
* @param cipher The cipher to create a helper for.
|
|
299
|
-
*
|
|
300
|
-
* @return An object with encrypt and decrypt shortcut functions.
|
|
301
|
-
*
|
|
302
|
-
* @example
|
|
303
|
-
*
|
|
304
|
-
* const AES = Cipher._createHelper(AESAlgorithm);
|
|
305
|
-
*/
|
|
306
|
-
static _createHelper(cipher: typeof Cipher): CipherHelper;
|
|
307
|
-
/**
|
|
308
|
-
* Creates this cipher in decryption mode.
|
|
309
|
-
*
|
|
310
|
-
* @param key The key.
|
|
311
|
-
* @param cfg (Optional) The configuration options to use for this operation.
|
|
312
|
-
*
|
|
313
|
-
* @return A cipher instance.
|
|
314
|
-
*
|
|
315
|
-
* @example
|
|
316
|
-
*
|
|
317
|
-
* let cipher = AES.createDecryptor(keyWordArray, { iv: ivWordArray });
|
|
318
|
-
*/
|
|
319
|
-
static createDecryptor(key: WordArray | string, cfg?: BufferedBlockAlgorithmConfig): Cipher;
|
|
320
|
-
/**
|
|
321
|
-
* Creates this cipher in encryption mode.
|
|
322
|
-
*
|
|
323
|
-
* @param key The key.
|
|
324
|
-
* @param cfg (Optional) The configuration options to use for this operation.
|
|
325
|
-
*
|
|
326
|
-
* @return A cipher instance.
|
|
327
|
-
*
|
|
328
|
-
* @example
|
|
329
|
-
*
|
|
330
|
-
* let cipher = AES.createEncryptor(keyWordArray, { iv: ivWordArray });
|
|
331
|
-
*/
|
|
332
|
-
static createEncryptor(key: WordArray | string, cfg?: BufferedBlockAlgorithmConfig): Cipher;
|
|
333
|
-
/**
|
|
334
|
-
* Finalizes the encryption or decryption process.
|
|
335
|
-
* Note that the finalize operation is effectively a destructive, read-once operation.
|
|
336
|
-
*
|
|
337
|
-
* @param dataUpdate The final data to encrypt or decrypt.
|
|
338
|
-
*
|
|
339
|
-
* @return The data after final processing.
|
|
340
|
-
*
|
|
341
|
-
* @example
|
|
342
|
-
*
|
|
343
|
-
* var encrypted = cipher.finalize();
|
|
344
|
-
* var encrypted = cipher.finalize('data');
|
|
345
|
-
* var encrypted = cipher.finalize(wordArray);
|
|
346
|
-
*/
|
|
347
|
-
finalize(dataUpdate?: WordArray | string): WordArray;
|
|
348
|
-
/**
|
|
349
|
-
* Adds data to be encrypted or decrypted.
|
|
350
|
-
*
|
|
351
|
-
* @param dataUpdate The data to encrypt or decrypt.
|
|
352
|
-
*
|
|
353
|
-
* @return The data after processing.
|
|
354
|
-
*
|
|
355
|
-
* @example
|
|
356
|
-
*
|
|
357
|
-
* let encrypted = cipher.process('data');
|
|
358
|
-
* let encrypted = cipher.process(wordArray);
|
|
359
|
-
*/
|
|
360
|
-
process(dataUpdate: WordArray | string): WordArray;
|
|
361
|
-
/**
|
|
362
|
-
* Cipher specific finalize function explicitly implemented in the derived class.
|
|
363
|
-
*/
|
|
364
|
-
protected abstract _doFinalize(): WordArray;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
declare abstract class BlockCipher extends Cipher {
|
|
368
|
-
protected _mode: BlockCipherModeAlgorithm;
|
|
369
|
-
constructor(xformMode: number, key: WordArray, cfg?: BufferedBlockAlgorithmConfig);
|
|
370
|
-
abstract decryptBlock(M: number[], offset: number): void;
|
|
371
|
-
abstract encryptBlock(M: number[], offset: number): void;
|
|
372
|
-
reset(): void;
|
|
373
|
-
protected _doFinalize(): WordArray;
|
|
374
|
-
protected _doProcessBlock(words: number[], offset: number): void;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
declare class CBCEncryptor extends BlockCipherModeAlgorithm {
|
|
378
|
-
get prevBlock(): number[];
|
|
379
|
-
protected _prevBlock: number[] | undefined;
|
|
380
|
-
/**
|
|
381
|
-
* Processes the data block at offset.
|
|
382
|
-
*
|
|
383
|
-
* @param words The data words to operate on.
|
|
384
|
-
* @param offset The offset where the block starts.
|
|
385
|
-
*
|
|
386
|
-
* @example
|
|
387
|
-
*
|
|
388
|
-
* mode.processBlock(data.words, offset);
|
|
389
|
-
*/
|
|
390
|
-
processBlock(words: number[], offset: number): void;
|
|
391
|
-
xorBlock(words: number[], offset: number, blockSize: number): void;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
declare class CBCDecryptor extends BlockCipherModeAlgorithm {
|
|
395
|
-
get prevBlock(): number[];
|
|
396
|
-
protected _prevBlock: number[] | undefined;
|
|
397
|
-
/**
|
|
398
|
-
* Processes the data block at offset.
|
|
399
|
-
*
|
|
400
|
-
* @param words The data words to operate on.
|
|
401
|
-
* @param offset The offset where the block starts.
|
|
402
|
-
*
|
|
403
|
-
* @example
|
|
404
|
-
*
|
|
405
|
-
* mode.processBlock(data.words, offset);
|
|
406
|
-
*/
|
|
407
|
-
processBlock(words: number[], offset: number): void;
|
|
408
|
-
xorBlock(words: number[], offset: number, blockSize: number): void;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Cipher Block Chaining mode.
|
|
413
|
-
*/
|
|
414
|
-
declare abstract class CBC extends BlockCipherMode {
|
|
415
|
-
static Decryptor: typeof CBCDecryptor;
|
|
416
|
-
static Encryptor: typeof CBCEncryptor;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
declare class PKCS7 implements AbstractPadding {
|
|
420
|
-
/**
|
|
421
|
-
* Pads data using the algorithm defined in PKCS #5/7.
|
|
422
|
-
*
|
|
423
|
-
* @param data The data to pad.
|
|
424
|
-
* @param blockSize The multiple that the data should be padded to.
|
|
425
|
-
*
|
|
426
|
-
* @example
|
|
427
|
-
*
|
|
428
|
-
* PKCS7.pad(wordArray, 4);
|
|
429
|
-
*/
|
|
430
|
-
static pad(data: WordArray, blockSize: number): void;
|
|
431
|
-
/**
|
|
432
|
-
* Unpads data that had been padded using the algorithm defined in PKCS #5/7.
|
|
433
|
-
*
|
|
434
|
-
* @param data The data to unpad.
|
|
435
|
-
*
|
|
436
|
-
* @example
|
|
437
|
-
*
|
|
438
|
-
* PKCS7.unpad(wordArray);
|
|
439
|
-
*/
|
|
440
|
-
static unpad(data: WordArray): void;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
declare class SmpAesCrypt {
|
|
444
|
-
protected _password: string;
|
|
445
|
-
protected _salt: string;
|
|
446
|
-
protected _initVector?: string | undefined;
|
|
447
|
-
protected get _iv(): WordArray | undefined;
|
|
448
|
-
protected _mode: typeof CBC;
|
|
449
|
-
protected _padding: typeof PKCS7;
|
|
450
|
-
constructor(_password: string, _salt: string, _initVector?: string | undefined);
|
|
451
|
-
/**
|
|
452
|
-
* Decodes some data from a symmetric AES encryption
|
|
453
|
-
* @param {string} data
|
|
454
|
-
* @returns {string}
|
|
455
|
-
*/
|
|
456
|
-
decryptAES(data: string): string;
|
|
457
|
-
/**
|
|
458
|
-
* Encodes some data with a symmetric AES encryption
|
|
459
|
-
* @param {string} data
|
|
460
|
-
* @returns {string}
|
|
461
|
-
*/
|
|
462
|
-
encryptAES(data: string): string;
|
|
463
|
-
/**
|
|
464
|
-
* This is the default password generation used by Marketing Cloud in their AMPScript
|
|
465
|
-
* @protected
|
|
466
|
-
*/
|
|
467
|
-
protected _buildKey(): WordArray;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
export { SmpAesCrypt as S, WordArray as W };
|
|
File without changes
|
|
File without changes
|