@lindorm/aes 0.1.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 (159) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +2 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/src/classes/AesCipher.d.ts +14 -0
  8. package/dist/src/classes/AesCipher.d.ts.map +1 -0
  9. package/dist/src/classes/AesCipher.js +50 -0
  10. package/dist/src/classes/AesCipher.js.map +1 -0
  11. package/dist/src/classes/index.d.ts +2 -0
  12. package/dist/src/classes/index.d.ts.map +1 -0
  13. package/dist/src/classes/index.js +18 -0
  14. package/dist/src/classes/index.js.map +1 -0
  15. package/dist/src/constants/index.d.ts +2 -0
  16. package/dist/src/constants/index.d.ts.map +1 -0
  17. package/dist/src/constants/index.js +18 -0
  18. package/dist/src/constants/index.js.map +1 -0
  19. package/dist/src/constants/version.d.ts +2 -0
  20. package/dist/src/constants/version.d.ts.map +1 -0
  21. package/dist/src/constants/version.js +5 -0
  22. package/dist/src/constants/version.js.map +1 -0
  23. package/dist/src/enums/AesEncryption.d.ts +9 -0
  24. package/dist/src/enums/AesEncryption.d.ts.map +1 -0
  25. package/dist/src/enums/AesEncryption.js +13 -0
  26. package/dist/src/enums/AesEncryption.js.map +1 -0
  27. package/dist/src/enums/AesEncryptionKeyAlgorithm.d.ts +9 -0
  28. package/dist/src/enums/AesEncryptionKeyAlgorithm.d.ts.map +1 -0
  29. package/dist/src/enums/AesEncryptionKeyAlgorithm.js +13 -0
  30. package/dist/src/enums/AesEncryptionKeyAlgorithm.js.map +1 -0
  31. package/dist/src/enums/AesFormat.d.ts +6 -0
  32. package/dist/src/enums/AesFormat.d.ts.map +1 -0
  33. package/dist/src/enums/AesFormat.js +10 -0
  34. package/dist/src/enums/AesFormat.js.map +1 -0
  35. package/dist/src/enums/AesIntegrityHash.d.ts +6 -0
  36. package/dist/src/enums/AesIntegrityHash.d.ts.map +1 -0
  37. package/dist/src/enums/AesIntegrityHash.js +10 -0
  38. package/dist/src/enums/AesIntegrityHash.js.map +1 -0
  39. package/dist/src/enums/index.d.ts +5 -0
  40. package/dist/src/enums/index.d.ts.map +1 -0
  41. package/dist/src/enums/index.js +21 -0
  42. package/dist/src/enums/index.js.map +1 -0
  43. package/dist/src/errors/AesError.d.ts +4 -0
  44. package/dist/src/errors/AesError.d.ts.map +1 -0
  45. package/dist/src/errors/AesError.js +8 -0
  46. package/dist/src/errors/AesError.js.map +1 -0
  47. package/dist/src/errors/index.d.ts +2 -0
  48. package/dist/src/errors/index.d.ts.map +1 -0
  49. package/dist/src/errors/index.js +18 -0
  50. package/dist/src/errors/index.js.map +1 -0
  51. package/dist/src/index.d.ts +6 -0
  52. package/dist/src/index.d.ts.map +1 -0
  53. package/dist/src/index.js +22 -0
  54. package/dist/src/index.js.map +1 -0
  55. package/dist/src/types/aes-cipher-class.d.ts +10 -0
  56. package/dist/src/types/aes-cipher-class.d.ts.map +1 -0
  57. package/dist/src/types/aes-cipher-class.js +3 -0
  58. package/dist/src/types/aes-cipher-class.js.map +1 -0
  59. package/dist/src/types/aes-cipher.d.ts +11 -0
  60. package/dist/src/types/aes-cipher.d.ts.map +1 -0
  61. package/dist/src/types/aes-cipher.js +3 -0
  62. package/dist/src/types/aes-cipher.js.map +1 -0
  63. package/dist/src/types/aes-data.d.ts +23 -0
  64. package/dist/src/types/aes-data.d.ts.map +1 -0
  65. package/dist/src/types/aes-data.js +3 -0
  66. package/dist/src/types/aes-data.js.map +1 -0
  67. package/dist/src/types/aes-encryption-data.d.ts +16 -0
  68. package/dist/src/types/aes-encryption-data.d.ts.map +1 -0
  69. package/dist/src/types/aes-encryption-data.js +3 -0
  70. package/dist/src/types/aes-encryption-data.js.map +1 -0
  71. package/dist/src/types/auth-tag.d.ts +31 -0
  72. package/dist/src/types/auth-tag.d.ts.map +1 -0
  73. package/dist/src/types/auth-tag.js +3 -0
  74. package/dist/src/types/auth-tag.js.map +1 -0
  75. package/dist/src/types/index.d.ts +6 -0
  76. package/dist/src/types/index.d.ts.map +1 -0
  77. package/dist/src/types/index.js +22 -0
  78. package/dist/src/types/index.js.map +1 -0
  79. package/dist/src/types/types.d.ts +10 -0
  80. package/dist/src/types/types.d.ts.map +1 -0
  81. package/dist/src/types/types.js +3 -0
  82. package/dist/src/types/types.js.map +1 -0
  83. package/dist/src/utils/aes-cipher.d.ts +6 -0
  84. package/dist/src/utils/aes-cipher.d.ts.map +1 -0
  85. package/dist/src/utils/aes-cipher.js +20 -0
  86. package/dist/src/utils/aes-cipher.js.map +1 -0
  87. package/dist/src/utils/aes-data.d.ts +4 -0
  88. package/dist/src/utils/aes-data.d.ts.map +1 -0
  89. package/dist/src/utils/aes-data.js +66 -0
  90. package/dist/src/utils/aes-data.js.map +1 -0
  91. package/dist/src/utils/index.d.ts +3 -0
  92. package/dist/src/utils/index.d.ts.map +1 -0
  93. package/dist/src/utils/index.js +19 -0
  94. package/dist/src/utils/index.js.map +1 -0
  95. package/dist/src/utils/private/auth-tag-hmac.d.ts +5 -0
  96. package/dist/src/utils/private/auth-tag-hmac.d.ts.map +1 -0
  97. package/dist/src/utils/private/auth-tag-hmac.js +25 -0
  98. package/dist/src/utils/private/auth-tag-hmac.js.map +1 -0
  99. package/dist/src/utils/private/auth-tag.d.ts +5 -0
  100. package/dist/src/utils/private/auth-tag.d.ts.map +1 -0
  101. package/dist/src/utils/private/auth-tag.js +58 -0
  102. package/dist/src/utils/private/auth-tag.js.map +1 -0
  103. package/dist/src/utils/private/decode-aes-string.d.ts +3 -0
  104. package/dist/src/utils/private/decode-aes-string.d.ts.map +1 -0
  105. package/dist/src/utils/private/decode-aes-string.js +39 -0
  106. package/dist/src/utils/private/decode-aes-string.js.map +1 -0
  107. package/dist/src/utils/private/ec/get-ec-keys.d.ts +21 -0
  108. package/dist/src/utils/private/ec/get-ec-keys.d.ts.map +1 -0
  109. package/dist/src/utils/private/ec/get-ec-keys.js +55 -0
  110. package/dist/src/utils/private/ec/get-ec-keys.js.map +1 -0
  111. package/dist/src/utils/private/ec/get-key-curve.d.ts +4 -0
  112. package/dist/src/utils/private/ec/get-key-curve.d.ts.map +1 -0
  113. package/dist/src/utils/private/ec/get-key-curve.js +37 -0
  114. package/dist/src/utils/private/ec/get-key-curve.js.map +1 -0
  115. package/dist/src/utils/private/encode-aes-string.d.ts +3 -0
  116. package/dist/src/utils/private/encode-aes-string.d.ts.map +1 -0
  117. package/dist/src/utils/private/encode-aes-string.js +25 -0
  118. package/dist/src/utils/private/encode-aes-string.js.map +1 -0
  119. package/dist/src/utils/private/get-decryption-key.d.ts +13 -0
  120. package/dist/src/utils/private/get-decryption-key.d.ts.map +1 -0
  121. package/dist/src/utils/private/get-decryption-key.js +33 -0
  122. package/dist/src/utils/private/get-decryption-key.js.map +1 -0
  123. package/dist/src/utils/private/get-encryption-keys.d.ts +16 -0
  124. package/dist/src/utils/private/get-encryption-keys.d.ts.map +1 -0
  125. package/dist/src/utils/private/get-encryption-keys.js +23 -0
  126. package/dist/src/utils/private/get-encryption-keys.js.map +1 -0
  127. package/dist/src/utils/private/get-initialisation-vector.d.ts +4 -0
  128. package/dist/src/utils/private/get-initialisation-vector.d.ts.map +1 -0
  129. package/dist/src/utils/private/get-initialisation-vector.js +23 -0
  130. package/dist/src/utils/private/get-initialisation-vector.js.map +1 -0
  131. package/dist/src/utils/private/oct/get-oct-keys.d.ts +14 -0
  132. package/dist/src/utils/private/oct/get-oct-keys.d.ts.map +1 -0
  133. package/dist/src/utils/private/oct/get-oct-keys.js +24 -0
  134. package/dist/src/utils/private/oct/get-oct-keys.js.map +1 -0
  135. package/dist/src/utils/private/rsa/generate-encryption-key.d.ts +4 -0
  136. package/dist/src/utils/private/rsa/generate-encryption-key.d.ts.map +1 -0
  137. package/dist/src/utils/private/rsa/generate-encryption-key.js +8 -0
  138. package/dist/src/utils/private/rsa/generate-encryption-key.js.map +1 -0
  139. package/dist/src/utils/private/rsa/get-oaep-hash.d.ts +3 -0
  140. package/dist/src/utils/private/rsa/get-oaep-hash.d.ts.map +1 -0
  141. package/dist/src/utils/private/rsa/get-oaep-hash.js +22 -0
  142. package/dist/src/utils/private/rsa/get-oaep-hash.js.map +1 -0
  143. package/dist/src/utils/private/rsa/get-rsa-keys.d.ts +21 -0
  144. package/dist/src/utils/private/rsa/get-rsa-keys.d.ts.map +1 -0
  145. package/dist/src/utils/private/rsa/get-rsa-keys.js +22 -0
  146. package/dist/src/utils/private/rsa/get-rsa-keys.js.map +1 -0
  147. package/dist/src/utils/private/rsa/public-encryption-key.d.ts +17 -0
  148. package/dist/src/utils/private/rsa/public-encryption-key.d.ts.map +1 -0
  149. package/dist/src/utils/private/rsa/public-encryption-key.js +56 -0
  150. package/dist/src/utils/private/rsa/public-encryption-key.js.map +1 -0
  151. package/dist/src/utils/private/secret/calculate-secret-length.d.ts +3 -0
  152. package/dist/src/utils/private/secret/calculate-secret-length.d.ts.map +1 -0
  153. package/dist/src/utils/private/secret/calculate-secret-length.js +21 -0
  154. package/dist/src/utils/private/secret/calculate-secret-length.js.map +1 -0
  155. package/dist/src/utils/private/secret/create-key-derivation.d.ts +10 -0
  156. package/dist/src/utils/private/secret/create-key-derivation.d.ts.map +1 -0
  157. package/dist/src/utils/private/secret/create-key-derivation.js +35 -0
  158. package/dist/src/utils/private/secret/create-key-derivation.js.map +1 -0
  159. package/package.json +33 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # 0.1.0 (2024-05-11)
7
+
8
+ ### Features
9
+
10
+ - implement aes package ([4267f1f](https://github.com/lindorm-io/monorepo/commit/4267f1f2b368bcc42181f274872793897347e539))
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # @lindorm/aes
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { AesCipherOptions } from "../types";
2
+ export declare class AesCipher {
3
+ private readonly encryption;
4
+ private readonly encryptionKeyAlgorithm;
5
+ private readonly format;
6
+ private readonly integrityHash;
7
+ private readonly kryptos;
8
+ constructor(options: AesCipherOptions);
9
+ encrypt(data: string): string;
10
+ decrypt(cipher: string): string;
11
+ verify(data: string, cipher: string): boolean;
12
+ assert(data: string, cipher: string): void;
13
+ }
14
+ //# sourceMappingURL=AesCipher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesCipher.d.ts","sourceRoot":"","sources":["../../../src/src/classes/AesCipher.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAKjB,MAAM,UAAU,CAAC;AAGlB,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAyB;IAChE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IACtC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEf,OAAO,EAAE,gBAAgB;IAQrC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAW7B,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAO/B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAQ7C,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAOlD"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AesCipher = void 0;
4
+ const utils_1 = require("../utils");
5
+ class AesCipher {
6
+ encryption;
7
+ encryptionKeyAlgorithm;
8
+ format;
9
+ integrityHash;
10
+ kryptos;
11
+ constructor(options) {
12
+ this.encryption = options.encryption || "aes-256-gcm";
13
+ this.encryptionKeyAlgorithm = options.encryptionKeyAlgorithm || "RSA-OAEP-256";
14
+ this.format = options.format || "base64url";
15
+ this.integrityHash = options.integrityHash || "sha256";
16
+ this.kryptos = options.kryptos;
17
+ }
18
+ encrypt(data) {
19
+ return (0, utils_1.encryptAesCipher)({
20
+ encryption: this.encryption,
21
+ data,
22
+ encryptionKeyAlgorithm: this.encryptionKeyAlgorithm,
23
+ format: this.format,
24
+ integrityHash: this.integrityHash,
25
+ kryptos: this.kryptos,
26
+ });
27
+ }
28
+ decrypt(cipher) {
29
+ return (0, utils_1.decryptAesCipher)({
30
+ cipher,
31
+ kryptos: this.kryptos,
32
+ });
33
+ }
34
+ verify(data, cipher) {
35
+ return (0, utils_1.verifyAesCipher)({
36
+ cipher,
37
+ data,
38
+ kryptos: this.kryptos,
39
+ });
40
+ }
41
+ assert(data, cipher) {
42
+ return (0, utils_1.assertAesCipher)({
43
+ cipher,
44
+ data,
45
+ kryptos: this.kryptos,
46
+ });
47
+ }
48
+ }
49
+ exports.AesCipher = AesCipher;
50
+ //# sourceMappingURL=AesCipher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesCipher.js","sourceRoot":"","sources":["../../../src/src/classes/AesCipher.ts"],"names":[],"mappings":";;;AAQA,oCAAgG;AAEhG,MAAa,SAAS;IACH,UAAU,CAAa;IACvB,sBAAsB,CAAyB;IAC/C,MAAM,CAAe;IACrB,aAAa,CAAgB;IAC7B,OAAO,CAAU;IAElC,YAAmB,OAAyB;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,aAAa,CAAC;QACtD,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,IAAI,cAAc,CAAC;QAC/E,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,QAAQ,CAAC;QACvD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACjC,CAAC;IAEM,OAAO,CAAC,IAAY;QACzB,OAAO,IAAA,wBAAgB,EAAC;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,IAAI;YACJ,sBAAsB,EAAE,IAAI,CAAC,sBAAsB;YACnD,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,OAAO,CAAC,MAAc;QAC3B,OAAO,IAAA,wBAAgB,EAAC;YACtB,MAAM;YACN,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,IAAY,EAAE,MAAc;QACxC,OAAO,IAAA,uBAAe,EAAC;YACrB,MAAM;YACN,IAAI;YACJ,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,IAAY,EAAE,MAAc;QACxC,OAAO,IAAA,uBAAe,EAAC;YACrB,MAAM;YACN,IAAI;YACJ,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;IACL,CAAC;CACF;AAhDD,8BAgDC"}
@@ -0,0 +1,2 @@
1
+ export * from "./AesCipher";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,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("./AesCipher"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/src/classes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
@@ -0,0 +1,2 @@
1
+ export * from "./version";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,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("./version"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
@@ -0,0 +1,2 @@
1
+ export declare const LATEST_AES_VERSION = 6;
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/src/constants/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,IAAI,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LATEST_AES_VERSION = void 0;
4
+ exports.LATEST_AES_VERSION = 6;
5
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/src/constants/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare enum AesEncryption {
2
+ AES_128_CBC = "aes-128-cbc",
3
+ AES_192_CBC = "aes-192-cbc",
4
+ AES_256_CBC = "aes-256-cbc",
5
+ AES_128_GCM = "aes-128-gcm",
6
+ AES_192_GCM = "aes-192-gcm",
7
+ AES_256_GCM = "aes-256-gcm"
8
+ }
9
+ //# sourceMappingURL=AesEncryption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesEncryption.d.ts","sourceRoot":"","sources":["../../../src/src/enums/AesEncryption.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IAEvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;CAC5B"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AesEncryption = void 0;
4
+ var AesEncryption;
5
+ (function (AesEncryption) {
6
+ AesEncryption["AES_128_CBC"] = "aes-128-cbc";
7
+ AesEncryption["AES_192_CBC"] = "aes-192-cbc";
8
+ AesEncryption["AES_256_CBC"] = "aes-256-cbc";
9
+ AesEncryption["AES_128_GCM"] = "aes-128-gcm";
10
+ AesEncryption["AES_192_GCM"] = "aes-192-gcm";
11
+ AesEncryption["AES_256_GCM"] = "aes-256-gcm";
12
+ })(AesEncryption || (exports.AesEncryption = AesEncryption = {}));
13
+ //# sourceMappingURL=AesEncryption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesEncryption.js","sourceRoot":"","sources":["../../../src/src/enums/AesEncryption.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAUX;AAVD,WAAY,aAAa;IAEvB,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAG3B,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;AAC7B,CAAC,EAVW,aAAa,6BAAb,aAAa,QAUxB"}
@@ -0,0 +1,9 @@
1
+ export declare enum AesEncryptionKeyAlgorithm {
2
+ ECDH_ES = "ECDH-ES",
3
+ RSA_OAEP = "RSA-OAEP",
4
+ RSA_OAEP_256 = "RSA-OAEP-256",
5
+ RSA_OAEP_384 = "RSA-OAEP-384",
6
+ RSA_OAEP_512 = "RSA-OAEP-512",
7
+ RSA_PRIVATE_KEY = "RSA-PRIVATE-KEY"
8
+ }
9
+ //# sourceMappingURL=AesEncryptionKeyAlgorithm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesEncryptionKeyAlgorithm.d.ts","sourceRoot":"","sources":["../../../src/src/enums/AesEncryptionKeyAlgorithm.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IAEnC,OAAO,YAAY;IAGnB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AesEncryptionKeyAlgorithm = void 0;
4
+ var AesEncryptionKeyAlgorithm;
5
+ (function (AesEncryptionKeyAlgorithm) {
6
+ AesEncryptionKeyAlgorithm["ECDH_ES"] = "ECDH-ES";
7
+ AesEncryptionKeyAlgorithm["RSA_OAEP"] = "RSA-OAEP";
8
+ AesEncryptionKeyAlgorithm["RSA_OAEP_256"] = "RSA-OAEP-256";
9
+ AesEncryptionKeyAlgorithm["RSA_OAEP_384"] = "RSA-OAEP-384";
10
+ AesEncryptionKeyAlgorithm["RSA_OAEP_512"] = "RSA-OAEP-512";
11
+ AesEncryptionKeyAlgorithm["RSA_PRIVATE_KEY"] = "RSA-PRIVATE-KEY";
12
+ })(AesEncryptionKeyAlgorithm || (exports.AesEncryptionKeyAlgorithm = AesEncryptionKeyAlgorithm = {}));
13
+ //# sourceMappingURL=AesEncryptionKeyAlgorithm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesEncryptionKeyAlgorithm.js","sourceRoot":"","sources":["../../../src/src/enums/AesEncryptionKeyAlgorithm.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAUX;AAVD,WAAY,yBAAyB;IAEnC,gDAAmB,CAAA;IAGnB,kDAAqB,CAAA;IACrB,0DAA6B,CAAA;IAC7B,0DAA6B,CAAA;IAC7B,0DAA6B,CAAA;IAC7B,gEAAmC,CAAA;AACrC,CAAC,EAVW,yBAAyB,yCAAzB,yBAAyB,QAUpC"}
@@ -0,0 +1,6 @@
1
+ export declare enum AesFormat {
2
+ BASE64 = "base64",
3
+ BASE64_URL = "base64url",
4
+ HEX = "hex"
5
+ }
6
+ //# sourceMappingURL=AesFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesFormat.d.ts","sourceRoot":"","sources":["../../../src/src/enums/AesFormat.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,UAAU,cAAc;IACxB,GAAG,QAAQ;CACZ"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AesFormat = void 0;
4
+ var AesFormat;
5
+ (function (AesFormat) {
6
+ AesFormat["BASE64"] = "base64";
7
+ AesFormat["BASE64_URL"] = "base64url";
8
+ AesFormat["HEX"] = "hex";
9
+ })(AesFormat || (exports.AesFormat = AesFormat = {}));
10
+ //# sourceMappingURL=AesFormat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesFormat.js","sourceRoot":"","sources":["../../../src/src/enums/AesFormat.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,qCAAwB,CAAA;IACxB,wBAAW,CAAA;AACb,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB"}
@@ -0,0 +1,6 @@
1
+ export declare enum AesIntegrityHash {
2
+ SHA256 = "sha256",
3
+ SHA384 = "sha384",
4
+ SHA512 = "sha512"
5
+ }
6
+ //# sourceMappingURL=AesIntegrityHash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesIntegrityHash.d.ts","sourceRoot":"","sources":["../../../src/src/enums/AesIntegrityHash.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AesIntegrityHash = void 0;
4
+ var AesIntegrityHash;
5
+ (function (AesIntegrityHash) {
6
+ AesIntegrityHash["SHA256"] = "sha256";
7
+ AesIntegrityHash["SHA384"] = "sha384";
8
+ AesIntegrityHash["SHA512"] = "sha512";
9
+ })(AesIntegrityHash || (exports.AesIntegrityHash = AesIntegrityHash = {}));
10
+ //# sourceMappingURL=AesIntegrityHash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesIntegrityHash.js","sourceRoot":"","sources":["../../../src/src/enums/AesIntegrityHash.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;AACnB,CAAC,EAJW,gBAAgB,gCAAhB,gBAAgB,QAI3B"}
@@ -0,0 +1,5 @@
1
+ export * from "./AesEncryption";
2
+ export * from "./AesEncryptionKeyAlgorithm";
3
+ export * from "./AesFormat";
4
+ export * from "./AesIntegrityHash";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,21 @@
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("./AesEncryption"), exports);
18
+ __exportStar(require("./AesEncryptionKeyAlgorithm"), exports);
19
+ __exportStar(require("./AesFormat"), exports);
20
+ __exportStar(require("./AesIntegrityHash"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/src/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,8DAA4C;AAC5C,8CAA4B;AAC5B,qDAAmC"}
@@ -0,0 +1,4 @@
1
+ import { LindormError } from "@lindorm/errors";
2
+ export declare class AesError extends LindormError {
3
+ }
4
+ //# sourceMappingURL=AesError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesError.d.ts","sourceRoot":"","sources":["../../../src/src/errors/AesError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,qBAAa,QAAS,SAAQ,YAAY;CAAG"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AesError = void 0;
4
+ const errors_1 = require("@lindorm/errors");
5
+ class AesError extends errors_1.LindormError {
6
+ }
7
+ exports.AesError = AesError;
8
+ //# sourceMappingURL=AesError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AesError.js","sourceRoot":"","sources":["../../../src/src/errors/AesError.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAE/C,MAAa,QAAS,SAAQ,qBAAY;CAAG;AAA7C,4BAA6C"}
@@ -0,0 +1,2 @@
1
+ export * from "./AesError";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,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("./AesError"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/src/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B"}
@@ -0,0 +1,6 @@
1
+ export * from "./classes";
2
+ export * from "./enums";
3
+ export * from "./errors";
4
+ export * from "./types";
5
+ export * from "./utils";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,22 @@
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("./classes"), exports);
18
+ __exportStar(require("./enums"), exports);
19
+ __exportStar(require("./errors"), exports);
20
+ __exportStar(require("./types"), exports);
21
+ __exportStar(require("./utils"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,10 @@
1
+ import { Kryptos } from "@lindorm/kryptos";
2
+ import { BufferFormat, Encryption, EncryptionKeyAlgorithm, IntegrityHash } from "./types";
3
+ export type AesCipherOptions = {
4
+ encryption?: Encryption;
5
+ encryptionKeyAlgorithm?: EncryptionKeyAlgorithm;
6
+ format?: BufferFormat;
7
+ integrityHash?: IntegrityHash;
8
+ kryptos: Kryptos;
9
+ };
10
+ //# sourceMappingURL=aes-cipher-class.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-cipher-class.d.ts","sourceRoot":"","sources":["../../../src/src/types/aes-cipher-class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=aes-cipher-class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-cipher-class.js","sourceRoot":"","sources":["../../../src/src/types/aes-cipher-class.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { Kryptos } from "@lindorm/kryptos";
2
+ import { EncryptAesDataOptions } from "./aes-data";
3
+ export type EncryptAesCipherOptions = EncryptAesDataOptions;
4
+ export type DecryptAesCipherOptions = {
5
+ cipher: string;
6
+ kryptos: Kryptos;
7
+ };
8
+ export type VerifyAesCipherOptions = DecryptAesCipherOptions & {
9
+ data: string;
10
+ };
11
+ //# sourceMappingURL=aes-cipher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-cipher.d.ts","sourceRoot":"","sources":["../../../src/src/types/aes-cipher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE5D,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,GAAG;IAC7D,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=aes-cipher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-cipher.js","sourceRoot":"","sources":["../../../src/src/types/aes-cipher.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ /// <reference types="node" />
2
+ import { Kryptos } from "@lindorm/kryptos";
3
+ import { BufferFormat, Encryption, EncryptionKeyAlgorithm, IntegrityHash, PublicEncryptionJwk } from "./types";
4
+ export type EncryptAesDataOptions = {
5
+ data: Buffer | string;
6
+ encryption?: Encryption;
7
+ encryptionKeyAlgorithm?: EncryptionKeyAlgorithm;
8
+ format?: BufferFormat;
9
+ integrityHash?: IntegrityHash;
10
+ kryptos: Kryptos;
11
+ };
12
+ export type DecryptAesDataOptions = {
13
+ authTag?: Buffer;
14
+ content: Buffer;
15
+ encryption: Encryption;
16
+ encryptionKeyAlgorithm?: EncryptionKeyAlgorithm;
17
+ initialisationVector: Buffer;
18
+ integrityHash?: IntegrityHash;
19
+ kryptos: Kryptos;
20
+ publicEncryptionJwk?: PublicEncryptionJwk;
21
+ publicEncryptionKey?: Buffer;
22
+ };
23
+ //# sourceMappingURL=aes-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-data.d.ts","sourceRoot":"","sources":["../../../src/src/types/aes-data.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,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/src/types/aes-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ /// <reference types="node" />
2
+ import { BufferFormat, Encryption, EncryptionKeyAlgorithm, IntegrityHash, PublicEncryptionJwk } from "./types";
3
+ export type AesEncryptionData = {
4
+ authTag: Buffer | undefined;
5
+ content: Buffer;
6
+ encryption: Encryption;
7
+ encryptionKeyAlgorithm: EncryptionKeyAlgorithm | undefined;
8
+ format: BufferFormat;
9
+ initialisationVector: Buffer;
10
+ integrityHash: IntegrityHash | undefined;
11
+ keyId: Buffer | undefined;
12
+ publicEncryptionJwk: PublicEncryptionJwk | undefined;
13
+ publicEncryptionKey: Buffer | undefined;
14
+ version: number;
15
+ };
16
+ //# sourceMappingURL=aes-encryption-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-encryption-data.d.ts","sourceRoot":"","sources":["../../../src/src/types/aes-encryption-data.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,sBAAsB,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC3D,MAAM,EAAE,YAAY,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,aAAa,GAAG,SAAS,CAAC;IACzC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,mBAAmB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACrD,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=aes-encryption-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes-encryption-data.js","sourceRoot":"","sources":["../../../src/src/types/aes-encryption-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { Cipher, CipherGCM, Decipher, DecipherGCM } from "crypto";
4
+ import { Encryption, IntegrityHash } from "./types";
5
+ export type GetAuthTagOptions = {
6
+ cipher: Cipher | CipherGCM;
7
+ content: Buffer;
8
+ encryption: Encryption;
9
+ encryptionKey: Buffer;
10
+ initialisationVector: Buffer;
11
+ integrityHash?: IntegrityHash;
12
+ };
13
+ export type SetAuthTagOptions = {
14
+ authTag?: Buffer;
15
+ content: Buffer;
16
+ decipher: Decipher | DecipherGCM;
17
+ decryptionKey: Buffer;
18
+ encryption: Encryption;
19
+ initialisationVector: Buffer;
20
+ integrityHash?: IntegrityHash;
21
+ };
22
+ export type CreateHmacAuthTag = {
23
+ content: Buffer;
24
+ encryptionKey: Buffer;
25
+ initialisationVector: Buffer;
26
+ integrityHash: IntegrityHash;
27
+ };
28
+ export type VerifyHmacAuthTag = CreateHmacAuthTag & {
29
+ authTag: Buffer;
30
+ };
31
+ //# sourceMappingURL=auth-tag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-tag.d.ts","sourceRoot":"","sources":["../../../src/src/types/auth-tag.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=auth-tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-tag.js","sourceRoot":"","sources":["../../../src/src/types/auth-tag.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from "./aes-cipher";
2
+ export * from "./aes-cipher-class";
3
+ export * from "./aes-data";
4
+ export * from "./aes-encryption-data";
5
+ export * from "./types";
6
+ //# sourceMappingURL=index.d.ts.map