@lindorm/aes 0.3.3 → 0.4.0

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 (189) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/classes/AesKit.d.ts +12 -9
  3. package/dist/classes/AesKit.d.ts.map +1 -1
  4. package/dist/classes/AesKit.js +42 -25
  5. package/dist/classes/AesKit.js.map +1 -1
  6. package/dist/constants/private/index.d.ts +3 -0
  7. package/dist/constants/private/index.d.ts.map +1 -0
  8. package/dist/constants/{index.js → private/index.js} +1 -0
  9. package/dist/constants/private/index.js.map +1 -0
  10. package/dist/constants/private/version.d.ts +2 -0
  11. package/dist/constants/private/version.d.ts.map +1 -0
  12. package/dist/constants/{version.js → private/version.js} +1 -1
  13. package/dist/constants/private/version.js.map +1 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/interfaces/AesKit.d.ts +13 -0
  19. package/dist/interfaces/AesKit.d.ts.map +1 -0
  20. package/dist/{types/aes-cipher.js → interfaces/AesKit.js} +1 -1
  21. package/dist/interfaces/AesKit.js.map +1 -0
  22. package/dist/interfaces/index.d.ts +2 -0
  23. package/dist/interfaces/index.d.ts.map +1 -0
  24. package/dist/interfaces/index.js +18 -0
  25. package/dist/interfaces/index.js.map +1 -0
  26. package/dist/mocks/index.d.ts +2 -0
  27. package/dist/mocks/index.d.ts.map +1 -0
  28. package/dist/mocks/index.js +18 -0
  29. package/dist/mocks/index.js.map +1 -0
  30. package/dist/mocks/mock-aes-kit.d.ts +3 -0
  31. package/dist/mocks/mock-aes-kit.d.ts.map +1 -0
  32. package/dist/mocks/mock-aes-kit.js +19 -0
  33. package/dist/mocks/mock-aes-kit.js.map +1 -0
  34. package/dist/types/aes-data.d.ts +17 -5
  35. package/dist/types/aes-data.d.ts.map +1 -1
  36. package/dist/types/aes-encryption-data.d.ts +18 -2
  37. package/dist/types/aes-encryption-data.d.ts.map +1 -1
  38. package/dist/types/index.d.ts +0 -1
  39. package/dist/types/index.d.ts.map +1 -1
  40. package/dist/types/index.js +0 -1
  41. package/dist/types/index.js.map +1 -1
  42. package/dist/types/private/aes-data.d.ts +12 -0
  43. package/dist/types/private/aes-data.d.ts.map +1 -0
  44. package/dist/types/private/aes-data.js +3 -0
  45. package/dist/types/private/aes-data.js.map +1 -0
  46. package/dist/types/private/index.d.ts +1 -0
  47. package/dist/types/private/index.d.ts.map +1 -1
  48. package/dist/types/private/index.js +1 -0
  49. package/dist/types/private/index.js.map +1 -1
  50. package/dist/utils/private/calculate/index.d.ts +7 -0
  51. package/dist/utils/private/calculate/index.d.ts.map +1 -0
  52. package/dist/utils/private/calculate/index.js +23 -0
  53. package/dist/utils/private/calculate/index.js.map +1 -0
  54. package/dist/utils/private/{aes-data → data}/auth-tag-hmac.d.ts +1 -1
  55. package/dist/utils/private/data/auth-tag-hmac.d.ts.map +1 -0
  56. package/dist/utils/private/data/auth-tag-hmac.js.map +1 -0
  57. package/dist/utils/private/data/auth-tag.d.ts.map +1 -0
  58. package/dist/utils/private/data/auth-tag.js.map +1 -0
  59. package/dist/utils/private/data/get-initialisation-vector.d.ts.map +1 -0
  60. package/dist/utils/private/data/get-initialisation-vector.js.map +1 -0
  61. package/dist/utils/private/data/index.d.ts +5 -0
  62. package/dist/utils/private/data/index.d.ts.map +1 -0
  63. package/dist/utils/private/data/index.js +21 -0
  64. package/dist/utils/private/data/index.js.map +1 -0
  65. package/dist/utils/private/data/split-content-encryption-key.d.ts.map +1 -0
  66. package/dist/utils/private/data/split-content-encryption-key.js.map +1 -0
  67. package/dist/utils/private/diffie-hellman/diffie-hellman-key-wrap.d.ts.map +1 -1
  68. package/dist/utils/private/diffie-hellman/diffie-hellman-key-wrap.js +8 -9
  69. package/dist/utils/private/diffie-hellman/diffie-hellman-key-wrap.js.map +1 -1
  70. package/dist/utils/private/diffie-hellman/diffie-hellman.js +6 -6
  71. package/dist/utils/private/diffie-hellman/diffie-hellman.js.map +1 -1
  72. package/dist/utils/private/diffie-hellman/index.d.ts +4 -0
  73. package/dist/utils/private/diffie-hellman/index.d.ts.map +1 -0
  74. package/dist/utils/private/diffie-hellman/index.js +20 -0
  75. package/dist/utils/private/diffie-hellman/index.js.map +1 -0
  76. package/dist/utils/private/encoded-aes.d.ts +4 -0
  77. package/dist/utils/private/encoded-aes.d.ts.map +1 -0
  78. package/dist/utils/private/encoded-aes.js +170 -0
  79. package/dist/utils/private/encoded-aes.js.map +1 -0
  80. package/dist/utils/private/encryption.d.ts +5 -0
  81. package/dist/utils/private/encryption.d.ts.map +1 -0
  82. package/dist/utils/private/{aes-data.js → encryption.js} +21 -25
  83. package/dist/utils/private/encryption.js.map +1 -0
  84. package/dist/utils/private/get-key/get-decryption-key.d.ts.map +1 -1
  85. package/dist/utils/private/get-key/get-decryption-key.js +5 -8
  86. package/dist/utils/private/get-key/get-decryption-key.js.map +1 -1
  87. package/dist/utils/private/get-key/get-encryption-key.d.ts.map +1 -1
  88. package/dist/utils/private/get-key/get-encryption-key.js +5 -8
  89. package/dist/utils/private/get-key/get-encryption-key.js.map +1 -1
  90. package/dist/utils/private/get-key/index.d.ts +3 -0
  91. package/dist/utils/private/get-key/index.d.ts.map +1 -0
  92. package/dist/utils/private/get-key/index.js +19 -0
  93. package/dist/utils/private/get-key/index.js.map +1 -0
  94. package/dist/utils/private/index.d.ts +14 -0
  95. package/dist/utils/private/index.d.ts.map +1 -0
  96. package/dist/utils/private/index.js +30 -0
  97. package/dist/utils/private/index.js.map +1 -0
  98. package/dist/utils/private/is-aes.d.ts +5 -0
  99. package/dist/utils/private/is-aes.d.ts.map +1 -0
  100. package/dist/utils/private/is-aes.js +14 -0
  101. package/dist/utils/private/is-aes.js.map +1 -0
  102. package/dist/utils/private/key-derivation/index.d.ts +3 -0
  103. package/dist/utils/private/key-derivation/index.d.ts.map +1 -0
  104. package/dist/utils/private/key-derivation/index.js +19 -0
  105. package/dist/utils/private/key-derivation/index.js.map +1 -0
  106. package/dist/utils/private/key-types/get-ec-keys.d.ts.map +1 -1
  107. package/dist/utils/private/key-types/get-ec-keys.js +3 -4
  108. package/dist/utils/private/key-types/get-ec-keys.js.map +1 -1
  109. package/dist/utils/private/key-types/get-oct-keys.d.ts.map +1 -1
  110. package/dist/utils/private/key-types/get-oct-keys.js +7 -9
  111. package/dist/utils/private/key-types/get-oct-keys.js.map +1 -1
  112. package/dist/utils/private/key-types/get-okp-keys.d.ts.map +1 -1
  113. package/dist/utils/private/key-types/get-okp-keys.js +3 -4
  114. package/dist/utils/private/key-types/get-okp-keys.js.map +1 -1
  115. package/dist/utils/private/key-types/get-rsa-keys.d.ts.map +1 -1
  116. package/dist/utils/private/key-types/get-rsa-keys.js +4 -5
  117. package/dist/utils/private/key-types/get-rsa-keys.js.map +1 -1
  118. package/dist/utils/private/key-types/index.d.ts +5 -0
  119. package/dist/utils/private/key-types/index.d.ts.map +1 -0
  120. package/dist/utils/private/key-types/index.js +21 -0
  121. package/dist/utils/private/key-types/index.js.map +1 -0
  122. package/dist/utils/private/key-wrap/ecb-key-wrap.js +3 -3
  123. package/dist/utils/private/key-wrap/ecb-key-wrap.js.map +1 -1
  124. package/dist/utils/private/key-wrap/gcm-key-wrap.js +3 -3
  125. package/dist/utils/private/key-wrap/gcm-key-wrap.js.map +1 -1
  126. package/dist/utils/private/key-wrap/index.d.ts +4 -0
  127. package/dist/utils/private/key-wrap/index.d.ts.map +1 -0
  128. package/dist/utils/private/key-wrap/index.js +20 -0
  129. package/dist/utils/private/key-wrap/index.js.map +1 -0
  130. package/dist/utils/private/oct/get-oct-dir-keys.js +3 -3
  131. package/dist/utils/private/oct/get-oct-dir-keys.js.map +1 -1
  132. package/dist/utils/private/oct/get-oct-key-key-wrap.d.ts.map +1 -1
  133. package/dist/utils/private/oct/get-oct-key-key-wrap.js +8 -9
  134. package/dist/utils/private/oct/get-oct-key-key-wrap.js.map +1 -1
  135. package/dist/utils/private/oct/get-oct-pbkdf-key-wrap-keys.d.ts.map +1 -1
  136. package/dist/utils/private/oct/get-oct-pbkdf-key-wrap-keys.js +12 -14
  137. package/dist/utils/private/oct/get-oct-pbkdf-key-wrap-keys.js.map +1 -1
  138. package/dist/utils/private/oct/index.d.ts +4 -0
  139. package/dist/utils/private/oct/index.d.ts.map +1 -0
  140. package/dist/utils/private/oct/index.js +20 -0
  141. package/dist/utils/private/oct/index.js.map +1 -0
  142. package/dist/utils/private/serialised-aes.d.ts +4 -0
  143. package/dist/utils/private/serialised-aes.d.ts.map +1 -0
  144. package/dist/utils/private/serialised-aes.js +48 -0
  145. package/dist/utils/private/serialised-aes.js.map +1 -0
  146. package/dist/utils/private/tokenised-aes.d.ts +4 -0
  147. package/dist/utils/private/tokenised-aes.d.ts.map +1 -0
  148. package/dist/utils/private/tokenised-aes.js +67 -0
  149. package/dist/utils/private/tokenised-aes.js.map +1 -0
  150. package/package.json +4 -3
  151. package/dist/constants/index.d.ts +0 -2
  152. package/dist/constants/index.d.ts.map +0 -1
  153. package/dist/constants/index.js.map +0 -1
  154. package/dist/constants/version.d.ts +0 -2
  155. package/dist/constants/version.d.ts.map +0 -1
  156. package/dist/constants/version.js.map +0 -1
  157. package/dist/types/aes-cipher.d.ts +0 -11
  158. package/dist/types/aes-cipher.d.ts.map +0 -1
  159. package/dist/types/aes-cipher.js.map +0 -1
  160. package/dist/utils/private/aes-cipher.d.ts +0 -6
  161. package/dist/utils/private/aes-cipher.d.ts.map +0 -1
  162. package/dist/utils/private/aes-cipher.js +0 -20
  163. package/dist/utils/private/aes-cipher.js.map +0 -1
  164. package/dist/utils/private/aes-data/auth-tag-hmac.d.ts.map +0 -1
  165. package/dist/utils/private/aes-data/auth-tag-hmac.js.map +0 -1
  166. package/dist/utils/private/aes-data/auth-tag.d.ts.map +0 -1
  167. package/dist/utils/private/aes-data/auth-tag.js.map +0 -1
  168. package/dist/utils/private/aes-data/get-initialisation-vector.d.ts.map +0 -1
  169. package/dist/utils/private/aes-data/get-initialisation-vector.js.map +0 -1
  170. package/dist/utils/private/aes-data/split-content-encryption-key.d.ts.map +0 -1
  171. package/dist/utils/private/aes-data/split-content-encryption-key.js.map +0 -1
  172. package/dist/utils/private/aes-data.d.ts +0 -4
  173. package/dist/utils/private/aes-data.d.ts.map +0 -1
  174. package/dist/utils/private/aes-data.js.map +0 -1
  175. package/dist/utils/private/decode-aes-string.d.ts +0 -3
  176. package/dist/utils/private/decode-aes-string.d.ts.map +0 -1
  177. package/dist/utils/private/decode-aes-string.js +0 -42
  178. package/dist/utils/private/decode-aes-string.js.map +0 -1
  179. package/dist/utils/private/encode-aes-string.d.ts +0 -3
  180. package/dist/utils/private/encode-aes-string.d.ts.map +0 -1
  181. package/dist/utils/private/encode-aes-string.js +0 -30
  182. package/dist/utils/private/encode-aes-string.js.map +0 -1
  183. /package/dist/utils/private/{aes-data → data}/auth-tag-hmac.js +0 -0
  184. /package/dist/utils/private/{aes-data → data}/auth-tag.d.ts +0 -0
  185. /package/dist/utils/private/{aes-data → data}/auth-tag.js +0 -0
  186. /package/dist/utils/private/{aes-data → data}/get-initialisation-vector.d.ts +0 -0
  187. /package/dist/utils/private/{aes-data → data}/get-initialisation-vector.js +0 -0
  188. /package/dist/utils/private/{aes-data → data}/split-content-encryption-key.d.ts +0 -0
  189. /package/dist/utils/private/{aes-data → data}/split-content-encryption-key.js +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.4.0](https://github.com/lindorm-io/monorepo/compare/@lindorm/aes@0.3.3...@lindorm/aes@0.4.0) (2024-10-09)
7
+
8
+ ### Bug Fixes
9
+
10
+ - move content to end of encoded array so that it can be any size ([b053924](https://github.com/lindorm-io/monorepo/commit/b05392484342976f519b32f943aac41271761df4))
11
+
12
+ ### Features
13
+
14
+ - add automatic b64 encoding ([f3ac64e](https://github.com/lindorm-io/monorepo/commit/f3ac64e7922528b1afe0f0acbc52b62aa7003d2d))
15
+ - rename modes and add encoded ([b8c9d4c](https://github.com/lindorm-io/monorepo/commit/b8c9d4c26a069444fa7bff5a809308cecff971ef))
16
+
6
17
  ## [0.3.3](https://github.com/lindorm-io/monorepo/compare/@lindorm/aes@0.3.2...@lindorm/aes@0.3.3) (2024-09-25)
7
18
 
8
19
  **Note:** Version bump only for package @lindorm/aes
@@ -1,13 +1,16 @@
1
- import { AesEncryptionData, AesKitOptions, DecryptAesDataOptions } from "../types";
2
- export declare class AesKit {
1
+ import { IKryptos } from "@lindorm/kryptos";
2
+ import { IAesKit } from "../interfaces";
3
+ import { AesDecryptionRecord, AesEncryptionRecord, AesKitOptions, SerialisedAesDecryption, SerialisedAesEncryption } from "../types";
4
+ export declare class AesKit implements IAesKit {
3
5
  private readonly encryption;
4
- private readonly kryptos;
6
+ readonly kryptos: IKryptos;
5
7
  constructor(options: AesKitOptions);
6
- encrypt(data: string, mode?: "cipher"): string;
7
- encrypt(data: string, mode: "object"): AesEncryptionData;
8
- decrypt(data: string): string;
9
- decrypt(data: Omit<DecryptAesDataOptions, "kryptos">): string;
10
- verify(data: string, cipher: string): boolean;
11
- assert(data: string, cipher: string): void;
8
+ encrypt(data: string, mode?: "encoded"): string;
9
+ encrypt(data: string, mode: "record"): AesEncryptionRecord;
10
+ encrypt(data: string, mode: "serialised"): SerialisedAesEncryption;
11
+ encrypt(data: string, mode: "tokenised"): string;
12
+ decrypt(data: AesDecryptionRecord | SerialisedAesDecryption | string): string;
13
+ verify(input: string, data: AesDecryptionRecord | SerialisedAesDecryption | string): boolean;
14
+ assert(input: string, data: AesDecryptionRecord | SerialisedAesDecryption | string): void;
12
15
  }
13
16
  //# sourceMappingURL=AesKit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AesKit.d.ts","sourceRoot":"","sources":["../../src/classes/AesKit.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,a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EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,uBAAuB;IAClE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM;IA6ChD,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,GAAG,MAAM;IAgC7E,MAAM,CACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,GAC3D,OAAO;IAIH,MAAM,CACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,GAC3D,IAAI;CAIR"}
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AesKit = void 0;
4
4
  const is_1 = require("@lindorm/is");
5
5
  const errors_1 = require("../errors");
6
- const aes_cipher_1 = require("../utils/private/aes-cipher");
7
- const aes_data_1 = require("../utils/private/aes-data");
6
+ const private_1 = require("../utils/private");
8
7
  class AesKit {
9
8
  encryption;
10
9
  kryptos;
@@ -12,52 +11,70 @@ class AesKit {
12
11
  this.kryptos = options.kryptos;
13
12
  this.encryption = options.encryption ?? options.kryptos.encryption ?? "A256GCM";
14
13
  }
15
- encrypt(data, mode = "cipher") {
14
+ encrypt(data, mode = "encoded") {
16
15
  switch (mode) {
17
- case "cipher":
18
- return (0, aes_cipher_1.encryptAesCipher)({
16
+ case "encoded":
17
+ return (0, private_1.createEncodedAesString)((0, private_1.encryptAes)({
19
18
  data: data,
20
19
  encryption: this.encryption,
21
20
  kryptos: this.kryptos,
22
- });
23
- case "object":
24
- return (0, aes_data_1.encryptAesData)({
21
+ }));
22
+ case "record":
23
+ return (0, private_1.encryptAes)({
25
24
  data: data,
26
25
  encryption: this.encryption,
27
26
  kryptos: this.kryptos,
28
27
  });
28
+ case "serialised":
29
+ return (0, private_1.createSerialisedAesRecord)((0, private_1.encryptAes)({
30
+ data: data,
31
+ encryption: this.encryption,
32
+ kryptos: this.kryptos,
33
+ }));
34
+ case "tokenised":
35
+ return (0, private_1.createTokenisedAesString)((0, private_1.encryptAes)({
36
+ data: data,
37
+ encryption: this.encryption,
38
+ kryptos: this.kryptos,
39
+ }));
29
40
  default:
30
41
  throw new errors_1.AesError("Invalid encryption mode");
31
42
  }
32
43
  }
33
44
  decrypt(data) {
34
- if ((0, is_1.isString)(data)) {
35
- return (0, aes_cipher_1.decryptAesCipher)({
36
- cipher: data,
45
+ if ((0, is_1.isString)(data) && !(0, private_1.isAesTokenised)(data)) {
46
+ return (0, private_1.decryptAes)({
47
+ ...(0, private_1.parseEncodedAesString)(data),
37
48
  kryptos: this.kryptos,
38
49
  });
39
50
  }
40
- if ((0, is_1.isObject)(data)) {
41
- return (0, aes_data_1.decryptAesData)({
51
+ if ((0, is_1.isString)(data) && (0, private_1.isAesTokenised)(data)) {
52
+ return (0, private_1.decryptAes)({
53
+ ...(0, private_1.parseTokenisedAesString)(data),
54
+ kryptos: this.kryptos,
55
+ });
56
+ }
57
+ if ((0, is_1.isObject)(data) && (0, private_1.isAesBufferData)(data)) {
58
+ return (0, private_1.decryptAes)({
42
59
  ...data,
43
60
  kryptos: this.kryptos,
44
61
  });
45
62
  }
63
+ if ((0, is_1.isObject)(data) && (0, private_1.isAesSerialisedData)(data)) {
64
+ return (0, private_1.decryptAes)({
65
+ ...(0, private_1.parseSerialisedAesRecord)(data),
66
+ kryptos: this.kryptos,
67
+ });
68
+ }
46
69
  throw new errors_1.AesError("Invalid decryption type");
47
70
  }
48
- verify(data, cipher) {
49
- return (0, aes_cipher_1.verifyAesCipher)({
50
- cipher,
51
- data,
52
- kryptos: this.kryptos,
53
- });
71
+ verify(input, data) {
72
+ return this.decrypt(data) === input;
54
73
  }
55
- assert(data, cipher) {
56
- return (0, aes_cipher_1.assertAesCipher)({
57
- cipher,
58
- data,
59
- kryptos: this.kryptos,
60
- });
74
+ assert(input, data) {
75
+ if (this.verify(input, data))
76
+ return;
77
+ throw new errors_1.AesError("Invalid AES cipher");
61
78
  }
62
79
  }
63
80
  exports.AesKit = AesKit;
@@ -1 +1 @@
1
- {"version":3,"file":"AesKit.js","sourceRoot":"","sources":["../../src/classes/AesKit.ts"],"names":[],"mappings":";;;AAAA,oCAAiD;AAEjD,sCAAqC;AAErC,4DAKqC;AACrC,wDAA2E;AAE3E,MAAa,MAAM;IACA,UAAU,CAAoB;IAC9B,OAAO,CAAW;IAEnC,YAAmB,OAAsB;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,UAAU,IAAI,SAAS,CAAC;IAClF,CAAC;IAIM,OAAO,CACZ,IAAY,EACZ,OAA4B,QAAQ;QAEpC,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ;gBACX,OAAO,IAAA,6BAAgB,EAAC;oBACtB,IAAI,EAAE,IAAI;oBACV,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC,CAAC;YAEL,KAAK,QAAQ;gBACX,OAAO,IAAA,yBAAc,EAAC;oBACpB,IAAI,EAAE,IAAI;oBACV,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;iBACtB,CAAC,CAAC;YAEL;gBACE,MAAM,IAAI,iBAAQ,CAAC,yBAAyB,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAIM,OAAO,CAAC,IAAqD;QAClE,IAAI,IAAA,aAAQ,EAAC,IAAI,CAAC,EAAE,CAAC;YACnB,OAAO,IAAA,6BAAgB,EAAC;gBACtB,MAAM,EAAE,IAAI;gBACZ,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,IAAA,aAAQ,EAAC,IAAI,CAAC,EAAE,CAAC;YACnB,OAAO,IAAA,yBAAc,E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AC;QACL,CAAC;QAED,IAAI,IAAA,aAAQ,EAAC,IAAI,CAAC,IAAI,IAAA,6BAAmB,EAAC,IAAI,CAAC,EAAE,CAAC;YAChD,OAAO,IAAA,oBAAU,EAAC;gBAChB,GAAG,IAAA,kCAAwB,EAAC,IAAI,CAAC;gBACjC,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,IAAI,iBAAQ,CAAC,yBAAyB,CAAC,CAAC;IAChD,CAAC;IAEM,MAAM,CACX,KAAa,EACb,IAA4D;QAE5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC;IACtC,CAAC;IAEM,MAAM,CACX,KAAa,EACb,IAA4D;QAE5D,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC;YAAE,OAAO;QACrC,MAAM,IAAI,iBAAQ,CAAC,oBAAoB,CAAC,CAAC;IAC3C,CAAC;CACF;AAvGD,wBAuGC"}
@@ -0,0 +1,3 @@
1
+ export * from "./format";
2
+ export * from "./version";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/private/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./format"), exports);
17
18
  __exportStar(require("./version"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/private/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B"}
@@ -0,0 +1,2 @@
1
+ export declare const LATEST_AES_VERSION = 9;
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/constants/private/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,IAAI,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LATEST_AES_VERSION = void 0;
4
- exports.LATEST_AES_VERSION = 8;
4
+ exports.LATEST_AES_VERSION = 9;
5
5
  //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/constants/private/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "./classes";
2
2
  export * from "./errors";
3
+ export * from "./interfaces";
4
+ export * from "./mocks";
3
5
  export * from "./types";
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -16,5 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./classes"), exports);
18
18
  __exportStar(require("./errors"), exports);
19
+ __exportStar(require("./interfaces"), exports);
20
+ __exportStar(require("./mocks"), exports);
19
21
  __exportStar(require("./types"), exports);
20
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,13 @@
1
+ import { IKryptos } from "@lindorm/kryptos";
2
+ import { AesDecryptionRecord, AesEncryptionRecord, SerialisedAesDecryption, SerialisedAesEncryption } from "../types";
3
+ export interface IAesKit {
4
+ kryptos: IKryptos;
5
+ encrypt(data: string, mode?: "encoded"): string;
6
+ encrypt(data: string, mode: "record"): AesEncryptionRecord;
7
+ encrypt(data: string, mode: "serialised"): SerialisedAesEncryption;
8
+ encrypt(data: string, mode: "tokenised"): string;
9
+ decrypt(data: AesDecryptionRecord | SerialisedAesDecryption | string): string;
10
+ verify(input: string, data: AesDecryptionRecord | SerialisedAesDecryption | string): boolean;
11
+ assert(input: string, data: AesDecryptionRecord | SerialisedAesDecryption | string): void;
12
+ }
13
+ //# sourceMappingURL=AesKit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/AesKit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,QAAQ,CAAC;IAElB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAChD,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,mBAAmB,CAAC;IAC3D,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,uBAAuB,CAAC;IACnE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;IAEjD,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9E,MAAM,CACJ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,GAC3D,OAAO,CAAC;IACX,MAAM,CACJ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,GAC3D,IAAI,CAAC;CACT"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=aes-cipher.js.map
3
+ //# sourceMappingURL=AesKit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesKit.js","sourceRoot":"","sources":["../../src/interfaces/AesKit.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./AesKit";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AesKit"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
@@ -0,0 +1,2 @@
1
+ export * from "./mock-aes-kit";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./mock-aes-kit"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mocks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
@@ -0,0 +1,3 @@
1
+ import { IAesKit } from "../interfaces";
2
+ export declare const createMockAesKit: () => IAesKit;
3
+ //# sourceMappingURL=mock-aes-kit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock-aes-kit.d.ts","sourceRoot":"","sources":["../../src/mocks/mock-aes-kit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,eAAO,MAAM,gBAAgB,QAAO,OAiBlC,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createMockAesKit = void 0;
4
+ const kryptos_1 = require("@lindorm/kryptos");
5
+ const createMockAesKit = () => ({
6
+ kryptos: (0, kryptos_1.createMockKryptos)(),
7
+ decrypt: jest
8
+ .fn()
9
+ .mockImplementation((data) => Buffer.from(JSON.stringify(data), "base64").toString()),
10
+ encrypt: jest
11
+ .fn()
12
+ .mockImplementation((data, mode) => mode === "cipher"
13
+ ? Buffer.from(data).toString("base64")
14
+ : { content: Buffer.from(data).toString("base64") }),
15
+ assert: jest.fn(),
16
+ verify: jest.fn().mockReturnValue(true),
17
+ });
18
+ exports.createMockAesKit = createMockAesKit;
19
+ //# sourceMappingURL=mock-aes-kit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock-aes-kit.js","sourceRoot":"","sources":["../../src/mocks/mock-aes-kit.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;AAI9C,MAAM,gBAAgB,GAAG,GAAY,EAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,IAAA,2BAAiB,GAAE;IAE5B,OAAO,EAAE,IAAI;SACV,EAAE,EAAE;SACJ,kBAAkB,CAAC,CAAC,IAAmB,EAAE,EAAE,CAC1C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CACvD;IACH,OAAO,EAAE,IAAI;SACV,EAAE,EAAE;SACJ,kBAAkB,CAAC,CAAC,IAAY,EAAE,IAAS,EAAE,EAAE,CAC9C,IAAI,KAAK,QAAQ;QACf,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACtC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CACtD;IACH,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;IACjB,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC;CACxC,CAAC,CAAC;AAjBU,QAAA,gBAAgB,oBAiB1B"}
@@ -1,17 +1,16 @@
1
- import { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
1
+ import { KryptosEncryption } from "@lindorm/kryptos";
2
2
  import { PublicEncryptionJwk } from "./types";
3
- export type EncryptAesDataOptions = {
3
+ export type AesEncryptionMode = "encoded" | "record" | "serialised" | "tokenised";
4
+ export type AesEncryptionOptions = {
4
5
  data: Buffer | string;
5
6
  encryption?: KryptosEncryption;
6
- kryptos: IKryptos;
7
7
  };
8
- export type DecryptAesDataOptions = {
8
+ export type AesDecryptionRecord = {
9
9
  authTag?: Buffer;
10
10
  content: Buffer;
11
11
  encryption: KryptosEncryption;
12
12
  hkdfSalt?: Buffer;
13
13
  initialisationVector: Buffer;
14
- kryptos: IKryptos;
15
14
  pbkdfIterations?: number;
16
15
  pbkdfSalt?: Buffer;
17
16
  publicEncryptionIv?: Buffer;
@@ -19,4 +18,17 @@ export type DecryptAesDataOptions = {
19
18
  publicEncryptionKey?: Buffer;
20
19
  publicEncryptionTag?: Buffer;
21
20
  };
21
+ export type SerialisedAesDecryption = {
22
+ authTag?: string;
23
+ content: string;
24
+ encryption: KryptosEncryption;
25
+ hkdfSalt?: string;
26
+ initialisationVector: string;
27
+ pbkdfIterations?: number;
28
+ pbkdfSalt?: string;
29
+ publicEncryptionIv?: string;
30
+ publicEncryptionJwk?: PublicEncryptionJwk;
31
+ publicEncryptionKey?: string;
32
+ publicEncryptionTag?: string;
33
+ };
22
34
  //# sourceMappingURL=aes-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aes-data.d.ts","sourceRoot":"","sources":["../../src/types/aes-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,EAAE,QAAQ,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC"}
1
+ {"version":3,"file":"aes-data.d.ts","sourceRoot":"","sources":["../../src/types/aes-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,CAAC;AAElF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { KryptosAlgorithm, KryptosEncryption } from "@lindorm/kryptos";
2
2
  import { PublicEncryptionJwk } from "./types";
3
- export type AesEncryptionData = {
3
+ export type AesEncryptionRecord = {
4
4
  algorithm: KryptosAlgorithm;
5
5
  authTag: Buffer;
6
6
  content: Buffer;
7
7
  encryption: KryptosEncryption;
8
8
  hkdfSalt: Buffer | undefined;
9
9
  initialisationVector: Buffer;
10
- keyId: Buffer;
10
+ keyId: string;
11
11
  pbkdfIterations: number | undefined;
12
12
  pbkdfSalt: Buffer | undefined;
13
13
  publicEncryptionIv: Buffer | undefined;
@@ -16,4 +16,20 @@ export type AesEncryptionData = {
16
16
  publicEncryptionTag: Buffer | undefined;
17
17
  version: number;
18
18
  };
19
+ export type SerialisedAesEncryption = {
20
+ algorithm: KryptosAlgorithm;
21
+ authTag: string;
22
+ content: string;
23
+ encryption: KryptosEncryption;
24
+ hkdfSalt: string | undefined;
25
+ initialisationVector: string;
26
+ keyId: string;
27
+ pbkdfIterations: number | undefined;
28
+ pbkdfSalt: string | undefined;
29
+ publicEncryptionIv: string | undefined;
30
+ publicEncryptionJwk: PublicEncryptionJwk | undefined;
31
+ publicEncryptionKey: string | undefined;
32
+ publicEncryptionTag: string | undefined;
33
+ version: number;
34
+ };
19
35
  //# sourceMappingURL=aes-encryption-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aes-encryption-data.d.ts","sourceRoot":"","sources":["../../src/types/aes-encryption-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,GAAG,SAAS,CA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E,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACrD,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,4 +1,3 @@
1
- export * from "./aes-cipher";
2
1
  export * from "./aes-data";
3
2
  export * from "./aes-encryption-data";
4
3
  export * from "./aes-kit";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./aes-cipher"), exports);
18
17
  __exportStar(require("./aes-data"), exports);
19
18
  __exportStar(require("./aes-encryption-data"), exports);
20
19
  __exportStar(require("./aes-kit"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,6CAA2B;AAC3B,wDAAsC;AACtC,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,wDAAsC;AACtC,4CAA0B;AAC1B,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,12 @@
1
+ import { IKryptos } from "@lindorm/kryptos";
2
+ import { AesDecryptionRecord, AesEncryptionOptions, SerialisedAesDecryption } from "../aes-data";
3
+ export type PrivateAesEncryptionOptions = AesEncryptionOptions & {
4
+ kryptos: IKryptos;
5
+ };
6
+ export type PrivateAesDecryptionOptions = AesDecryptionRecord & {
7
+ kryptos: IKryptos;
8
+ };
9
+ export type PrivateSerialisedAesDecryptionOptions = SerialisedAesDecryption & {
10
+ kryptos: IKryptos;
11
+ };
12
+ //# sourceMappingURL=aes-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-data.d.ts","sourceRoot":"","sources":["../../../src/types/private/aes-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,GAAG;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,GAAG;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEtF,MAAM,MAAM,qCAAqC,GAAG,uBAAuB,GAAG;IAC5E,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=aes-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-data.js","sourceRoot":"","sources":["../../../src/types/private/aes-data.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ export * from "./aes-data";
1
2
  export * from "./aes-key-derivation";
2
3
  export * from "./aes-string";
3
4
  export * from "./auth-tag";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/private/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/private/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC"}
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./aes-data"), exports);
17
18
  __exportStar(require("./aes-key-derivation"), exports);
18
19
  __exportStar(require("./aes-string"), exports);
19
20
  __exportStar(require("./auth-tag"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/private/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,+CAA6B;AAC7B,6CAA2B;AAC3B,2DAAyC;AACzC,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/private/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,uDAAqC;AACrC,+CAA6B;AAC7B,6CAA2B;AAC3B,2DAAyC;AACzC,6CAA2B"}
@@ -0,0 +1,7 @@
1
+ export * from "./calculate-aes-encryption";
2
+ export * from "./calculate-content-encryption-key-size";
3
+ export * from "./calculate-key-wrap-encryption";
4
+ export * from "./calculate-key-wrap-size";
5
+ export * from "./calculate-pbkdf-hash";
6
+ export * from "./calculate-rsa-oaep-hash";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/private/calculate/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./calculate-aes-encryption"), exports);
18
+ __exportStar(require("./calculate-content-encryption-key-size"), exports);
19
+ __exportStar(require("./calculate-key-wrap-encryption"), exports);
20
+ __exportStar(require("./calculate-key-wrap-size"), exports);
21
+ __exportStar(require("./calculate-pbkdf-hash"), exports);
22
+ __exportStar(require("./calculate-rsa-oaep-hash"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/private/calculate/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,0EAAwD;AACxD,kEAAgD;AAChD,4DAA0C;AAC1C,yDAAuC;AACvC,4DAA0C"}
@@ -1,4 +1,4 @@
1
- import { CreateHmacAuthTag, VerifyHmacAuthTag } from "../../../types/private/auth-tag";
1
+ import { CreateHmacAuthTag, VerifyHmacAuthTag } from "../../../types/private";
2
2
  export declare const createHmacAuthTag: ({ content, hashKey, initialisationVector, encryption, }: CreateHmacAuthTag) => Buffer;
3
3
  export declare const assertHmacAuthTag: ({ authTag, content, encryption, hashKey, initialisationVector, }: VerifyHmacAuthTag) => void;
4
4
  //# sourceMappingURL=auth-tag-hmac.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-tag-hmac.d.ts","sourceRoot":"","sources":["../../../../src/utils/private/data/auth-tag-hmac.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAkB9E,eAAO,MAAM,iBAAiB,4DAK3B,iBAAiB,KAAG,MAOtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qEAM3B,iBAAiB,KAAG,IAWtB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-tag-hmac.js","sourceRoot":"","sources":["../../../../src/utils/private/data/auth-tag-hmac.ts"],"names":[],"mappings":";;;AAEA,mCAAoC;AACpC,4CAA2C;AAG3C,MAAM,OAAO,GAAG,CAAC,UAA6B,EAAgB,EAAE;IAC9D,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,eAAe;YAClB,OAAO,QAAQ,CAAC;QAElB,KAAK,eAAe;YAClB,OAAO,QAAQ,CAAC;QAElB,KAAK,eAAe;YAClB,OAAO,QAAQ,CAAC;QAElB;YACE,MAAM,IAAI,iBAAQ,CAAC,sBAAsB,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAAC,EAChC,OAAO,EACP,OAAO,EACP,oBAAoB,EACpB,UAAU,GACQ,EAAU,EAAE;IAC9B,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,OAAO,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;IAEtD,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAErB,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;AACvB,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEK,MAAM,iBAAiB,GAAG,CAAC,EAChC,OAAO,EACP,OAAO,EACP,UAAU,EACV,OAAO,EACP,oBAAoB,GACF,EAAQ,EAAE;IAC5B,MAAM,SAAS,GAAG,IAAA,yBAAiB,EAAC;QAClC,OAAO;QACP,UAAU;QACV,OAAO;QACP,oBAAoB;KACrB,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO;IAErD,MAAM,IAAI,iBAAQ,CAAC,8BAA8B,CAAC,CAAC;AACrD,CAAC,CAAC;AAjBW,QAAA,iBAAiB,qBAiB5B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-tag.d.ts","sourceRoot":"","sources":["../../../../src/utils/private/data/auth-tag.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAG9E,eAAO,MAAM,aAAa,oEAMvB,iBAAiB,KAAG,MAoBtB,CAAC;AAEF,eAAO,MAAM,aAAa,+EAOvB,iBAAiB,KAAG,IA2BtB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-tag.js","sourceRoot":"","sources":["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