@lindorm/aes 0.6.5 → 0.7.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/README.md +126 -231
- package/dist/classes/AesKit.d.ts +4 -4
- package/dist/classes/AesKit.d.ts.map +1 -1
- package/dist/classes/AesKit.js +29 -33
- package/dist/classes/AesKit.js.map +1 -1
- package/dist/classes/index.d.ts +1 -1
- package/dist/classes/index.d.ts.map +1 -1
- package/dist/classes/index.js +1 -17
- package/dist/classes/index.js.map +1 -1
- package/dist/errors/AesError.js +2 -6
- package/dist/errors/AesError.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +1 -17
- package/dist/errors/index.js.map +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -22
- package/dist/index.js.map +1 -1
- package/dist/interfaces/AesKit.d.ts +3 -3
- package/dist/interfaces/AesKit.d.ts.map +1 -1
- package/dist/interfaces/AesKit.js +1 -2
- package/dist/interfaces/index.d.ts +1 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +1 -17
- package/dist/interfaces/index.js.map +1 -1
- package/dist/internal/constants/version.js +3 -6
- package/dist/internal/constants/version.js.map +1 -1
- package/dist/internal/types/aes-data.d.ts +4 -4
- package/dist/internal/types/aes-data.d.ts.map +1 -1
- package/dist/internal/types/aes-data.js +1 -2
- package/dist/internal/types/aes-key-derivation.js +1 -2
- package/dist/internal/types/auth-tag.d.ts +2 -2
- package/dist/internal/types/auth-tag.d.ts.map +1 -1
- package/dist/internal/types/auth-tag.js +1 -2
- package/dist/internal/types/auth-tag.js.map +1 -1
- package/dist/internal/types/content-encryption-key.d.ts +2 -2
- package/dist/internal/types/content-encryption-key.d.ts.map +1 -1
- package/dist/internal/types/content-encryption-key.js +1 -2
- package/dist/internal/types/key-wrap.d.ts +1 -1
- package/dist/internal/types/key-wrap.d.ts.map +1 -1
- package/dist/internal/types/key-wrap.js +1 -2
- package/dist/internal/types/prepared-encryption.d.ts +3 -3
- package/dist/internal/types/prepared-encryption.d.ts.map +1 -1
- package/dist/internal/types/prepared-encryption.js +1 -2
- package/dist/internal/utils/aes-header.d.ts +3 -3
- package/dist/internal/utils/aes-header.d.ts.map +1 -1
- package/dist/internal/utils/aes-header.js +22 -30
- package/dist/internal/utils/aes-header.js.map +1 -1
- package/dist/internal/utils/calculate/calculate-aes-encryption.d.ts +2 -2
- package/dist/internal/utils/calculate/calculate-aes-encryption.d.ts.map +1 -1
- package/dist/internal/utils/calculate/calculate-aes-encryption.js +4 -8
- package/dist/internal/utils/calculate/calculate-aes-encryption.js.map +1 -1
- package/dist/internal/utils/calculate/calculate-content-encryption-key-size.d.ts +2 -2
- package/dist/internal/utils/calculate/calculate-content-encryption-key-size.d.ts.map +1 -1
- package/dist/internal/utils/calculate/calculate-content-encryption-key-size.js +4 -8
- package/dist/internal/utils/calculate/calculate-content-encryption-key-size.js.map +1 -1
- package/dist/internal/utils/calculate/calculate-key-wrap-encryption.d.ts +1 -1
- package/dist/internal/utils/calculate/calculate-key-wrap-encryption.d.ts.map +1 -1
- package/dist/internal/utils/calculate/calculate-key-wrap-encryption.js +3 -7
- package/dist/internal/utils/calculate/calculate-key-wrap-encryption.js.map +1 -1
- package/dist/internal/utils/calculate/calculate-key-wrap-size.d.ts +2 -2
- package/dist/internal/utils/calculate/calculate-key-wrap-size.d.ts.map +1 -1
- package/dist/internal/utils/calculate/calculate-key-wrap-size.js +3 -7
- package/dist/internal/utils/calculate/calculate-key-wrap-size.js.map +1 -1
- package/dist/internal/utils/calculate/calculate-pbkdf-hash.d.ts +2 -2
- package/dist/internal/utils/calculate/calculate-pbkdf-hash.d.ts.map +1 -1
- package/dist/internal/utils/calculate/calculate-pbkdf-hash.js +3 -7
- package/dist/internal/utils/calculate/calculate-pbkdf-hash.js.map +1 -1
- package/dist/internal/utils/calculate/calculate-rsa-oaep-hash.d.ts +2 -2
- package/dist/internal/utils/calculate/calculate-rsa-oaep-hash.d.ts.map +1 -1
- package/dist/internal/utils/calculate/calculate-rsa-oaep-hash.js +3 -7
- package/dist/internal/utils/calculate/calculate-rsa-oaep-hash.js.map +1 -1
- package/dist/internal/utils/content.d.ts +1 -1
- package/dist/internal/utils/content.d.ts.map +1 -1
- package/dist/internal/utils/content.js +11 -17
- package/dist/internal/utils/content.js.map +1 -1
- package/dist/internal/utils/data/auth-tag-hmac.d.ts +1 -1
- package/dist/internal/utils/data/auth-tag-hmac.d.ts.map +1 -1
- package/dist/internal/utils/data/auth-tag-hmac.js +9 -14
- package/dist/internal/utils/data/auth-tag-hmac.js.map +1 -1
- package/dist/internal/utils/data/auth-tag.d.ts +1 -1
- package/dist/internal/utils/data/auth-tag.d.ts.map +1 -1
- package/dist/internal/utils/data/auth-tag.js +9 -14
- package/dist/internal/utils/data/auth-tag.js.map +1 -1
- package/dist/internal/utils/data/get-initialisation-vector.d.ts +1 -1
- package/dist/internal/utils/data/get-initialisation-vector.d.ts.map +1 -1
- package/dist/internal/utils/data/get-initialisation-vector.js +6 -10
- package/dist/internal/utils/data/get-initialisation-vector.js.map +1 -1
- package/dist/internal/utils/data/split-content-encryption-key.d.ts +1 -1
- package/dist/internal/utils/data/split-content-encryption-key.d.ts.map +1 -1
- package/dist/internal/utils/data/split-content-encryption-key.js +4 -8
- package/dist/internal/utils/data/split-content-encryption-key.js.map +1 -1
- package/dist/internal/utils/diffie-hellman/diffie-hellman-key-wrap.d.ts +1 -1
- package/dist/internal/utils/diffie-hellman/diffie-hellman-key-wrap.d.ts.map +1 -1
- package/dist/internal/utils/diffie-hellman/diffie-hellman-key-wrap.js +20 -25
- package/dist/internal/utils/diffie-hellman/diffie-hellman-key-wrap.js.map +1 -1
- package/dist/internal/utils/diffie-hellman/diffie-hellman.d.ts +1 -1
- package/dist/internal/utils/diffie-hellman/diffie-hellman.d.ts.map +1 -1
- package/dist/internal/utils/diffie-hellman/diffie-hellman.js +16 -21
- package/dist/internal/utils/diffie-hellman/diffie-hellman.js.map +1 -1
- package/dist/internal/utils/diffie-hellman/shared-secret.d.ts +3 -3
- package/dist/internal/utils/diffie-hellman/shared-secret.d.ts.map +1 -1
- package/dist/internal/utils/diffie-hellman/shared-secret.js +22 -27
- package/dist/internal/utils/diffie-hellman/shared-secret.js.map +1 -1
- package/dist/internal/utils/encoded-aes.d.ts +2 -2
- package/dist/internal/utils/encoded-aes.d.ts.map +1 -1
- package/dist/internal/utils/encoded-aes.js +18 -23
- package/dist/internal/utils/encoded-aes.js.map +1 -1
- package/dist/internal/utils/encrypt-content.d.ts +1 -1
- package/dist/internal/utils/encrypt-content.d.ts.map +1 -1
- package/dist/internal/utils/encrypt-content.js +14 -18
- package/dist/internal/utils/encrypt-content.js.map +1 -1
- package/dist/internal/utils/encrypt-encoded.d.ts +2 -2
- package/dist/internal/utils/encrypt-encoded.d.ts.map +1 -1
- package/dist/internal/utils/encrypt-encoded.js +15 -19
- package/dist/internal/utils/encrypt-encoded.js.map +1 -1
- package/dist/internal/utils/encrypt-serialised.d.ts +3 -3
- package/dist/internal/utils/encrypt-serialised.d.ts.map +1 -1
- package/dist/internal/utils/encrypt-serialised.js +20 -24
- package/dist/internal/utils/encrypt-serialised.js.map +1 -1
- package/dist/internal/utils/encrypt-tokenised.d.ts +2 -2
- package/dist/internal/utils/encrypt-tokenised.d.ts.map +1 -1
- package/dist/internal/utils/encrypt-tokenised.js +18 -22
- package/dist/internal/utils/encrypt-tokenised.js.map +1 -1
- package/dist/internal/utils/encryption.d.ts +3 -3
- package/dist/internal/utils/encryption.d.ts.map +1 -1
- package/dist/internal/utils/encryption.js +22 -27
- package/dist/internal/utils/encryption.js.map +1 -1
- package/dist/internal/utils/get-key/get-decryption-key.d.ts +1 -1
- package/dist/internal/utils/get-key/get-decryption-key.d.ts.map +1 -1
- package/dist/internal/utils/get-key/get-decryption-key.js +11 -15
- package/dist/internal/utils/get-key/get-decryption-key.js.map +1 -1
- package/dist/internal/utils/get-key/get-encryption-key.d.ts +1 -1
- package/dist/internal/utils/get-key/get-encryption-key.d.ts.map +1 -1
- package/dist/internal/utils/get-key/get-encryption-key.js +11 -15
- package/dist/internal/utils/get-key/get-encryption-key.js.map +1 -1
- package/dist/internal/utils/key-derivation/concat-kdf.d.ts +1 -1
- package/dist/internal/utils/key-derivation/concat-kdf.d.ts.map +1 -1
- package/dist/internal/utils/key-derivation/concat-kdf.js +3 -7
- package/dist/internal/utils/key-derivation/concat-kdf.js.map +1 -1
- package/dist/internal/utils/key-derivation/pbkdf.d.ts +1 -1
- package/dist/internal/utils/key-derivation/pbkdf.d.ts.map +1 -1
- package/dist/internal/utils/key-derivation/pbkdf.js +7 -11
- package/dist/internal/utils/key-derivation/pbkdf.js.map +1 -1
- package/dist/internal/utils/key-types/get-ec-keys.d.ts +1 -1
- package/dist/internal/utils/key-types/get-ec-keys.d.ts.map +1 -1
- package/dist/internal/utils/key-types/get-ec-keys.js +11 -16
- package/dist/internal/utils/key-types/get-ec-keys.js.map +1 -1
- package/dist/internal/utils/key-types/get-oct-keys.d.ts +1 -1
- package/dist/internal/utils/key-types/get-oct-keys.d.ts.map +1 -1
- package/dist/internal/utils/key-types/get-oct-keys.js +14 -19
- package/dist/internal/utils/key-types/get-oct-keys.js.map +1 -1
- package/dist/internal/utils/key-types/get-okp-keys.d.ts +1 -1
- package/dist/internal/utils/key-types/get-okp-keys.d.ts.map +1 -1
- package/dist/internal/utils/key-types/get-okp-keys.js +11 -16
- package/dist/internal/utils/key-types/get-okp-keys.js.map +1 -1
- package/dist/internal/utils/key-types/get-rsa-keys.d.ts +1 -1
- package/dist/internal/utils/key-types/get-rsa-keys.d.ts.map +1 -1
- package/dist/internal/utils/key-types/get-rsa-keys.js +24 -29
- package/dist/internal/utils/key-types/get-rsa-keys.js.map +1 -1
- package/dist/internal/utils/key-wrap/ecb-key-wrap.d.ts +1 -1
- package/dist/internal/utils/key-wrap/ecb-key-wrap.d.ts.map +1 -1
- package/dist/internal/utils/key-wrap/ecb-key-wrap.js +12 -17
- package/dist/internal/utils/key-wrap/ecb-key-wrap.js.map +1 -1
- package/dist/internal/utils/key-wrap/gcm-key-wrap.d.ts +1 -1
- package/dist/internal/utils/key-wrap/gcm-key-wrap.d.ts.map +1 -1
- package/dist/internal/utils/key-wrap/gcm-key-wrap.js +14 -19
- package/dist/internal/utils/key-wrap/gcm-key-wrap.js.map +1 -1
- package/dist/internal/utils/key-wrap/key-wrap.d.ts +1 -1
- package/dist/internal/utils/key-wrap/key-wrap.d.ts.map +1 -1
- package/dist/internal/utils/key-wrap/key-wrap.js +11 -16
- package/dist/internal/utils/key-wrap/key-wrap.js.map +1 -1
- package/dist/internal/utils/oct/get-oct-dir-keys.d.ts +1 -1
- package/dist/internal/utils/oct/get-oct-dir-keys.d.ts.map +1 -1
- package/dist/internal/utils/oct/get-oct-dir-keys.js +13 -18
- package/dist/internal/utils/oct/get-oct-dir-keys.js.map +1 -1
- package/dist/internal/utils/oct/get-oct-key-key-wrap.d.ts +1 -1
- package/dist/internal/utils/oct/get-oct-key-key-wrap.d.ts.map +1 -1
- package/dist/internal/utils/oct/get-oct-key-key-wrap.js +19 -24
- package/dist/internal/utils/oct/get-oct-key-key-wrap.js.map +1 -1
- package/dist/internal/utils/oct/get-oct-pbkdf-key-wrap-keys.d.ts +1 -1
- package/dist/internal/utils/oct/get-oct-pbkdf-key-wrap-keys.d.ts.map +1 -1
- package/dist/internal/utils/oct/get-oct-pbkdf-key-wrap-keys.js +25 -30
- package/dist/internal/utils/oct/get-oct-pbkdf-key-wrap-keys.js.map +1 -1
- package/dist/internal/utils/prepare-encryption.d.ts +1 -1
- package/dist/internal/utils/prepare-encryption.d.ts.map +1 -1
- package/dist/internal/utils/prepare-encryption.js +5 -9
- package/dist/internal/utils/prepare-encryption.js.map +1 -1
- package/dist/internal/utils/serialised-aes.d.ts +2 -2
- package/dist/internal/utils/serialised-aes.d.ts.map +1 -1
- package/dist/internal/utils/serialised-aes.js +19 -24
- package/dist/internal/utils/serialised-aes.js.map +1 -1
- package/dist/internal/utils/tokenised-aes.d.ts +2 -2
- package/dist/internal/utils/tokenised-aes.d.ts.map +1 -1
- package/dist/internal/utils/tokenised-aes.js +22 -27
- package/dist/internal/utils/tokenised-aes.js.map +1 -1
- package/dist/internal/utils/validate-version.js +8 -12
- package/dist/internal/utils/validate-version.js.map +1 -1
- package/dist/mocks/create-mock-aes-kit.d.ts +4 -0
- package/dist/mocks/create-mock-aes-kit.d.ts.map +1 -0
- package/dist/mocks/create-mock-aes-kit.js +81 -0
- package/dist/mocks/create-mock-aes-kit.js.map +1 -0
- package/dist/mocks/jest.d.ts +5 -0
- package/dist/mocks/jest.d.ts.map +1 -0
- package/dist/mocks/jest.js +4 -0
- package/dist/mocks/jest.js.map +1 -0
- package/dist/mocks/vitest.d.ts +6 -0
- package/dist/mocks/vitest.d.ts.map +1 -0
- package/dist/mocks/vitest.js +5 -0
- package/dist/mocks/vitest.js.map +1 -0
- package/dist/types/aes-decryption-data.d.ts +3 -3
- package/dist/types/aes-decryption-data.d.ts.map +1 -1
- package/dist/types/aes-decryption-data.js +1 -2
- package/dist/types/aes-encryption-data.d.ts +3 -3
- package/dist/types/aes-encryption-data.d.ts.map +1 -1
- package/dist/types/aes-encryption-data.js +1 -2
- package/dist/types/aes-kit.d.ts +1 -1
- package/dist/types/aes-kit.d.ts.map +1 -1
- package/dist/types/aes-kit.js +1 -2
- package/dist/types/content.d.ts +1 -1
- package/dist/types/content.d.ts.map +1 -1
- package/dist/types/content.js +1 -2
- package/dist/types/curve.js +1 -2
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +6 -22
- package/dist/types/index.js.map +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js +1 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -18
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/is-aes.d.ts +1 -1
- package/dist/utils/is-aes.d.ts.map +1 -1
- package/dist/utils/is-aes.js +4 -10
- package/dist/utils/is-aes.js.map +1 -1
- package/dist/utils/parse-aes.d.ts +1 -1
- package/dist/utils/parse-aes.d.ts.map +1 -1
- package/dist/utils/parse-aes.js +15 -19
- package/dist/utils/parse-aes.js.map +1 -1
- package/package.json +22 -23
- package/CHANGELOG.md +0 -165
- package/MERMAID.md +0 -155
- package/__tests__/INTEROP-RESULTS.md +0 -66
- package/__tests__/esm-smoke.test.ts +0 -15
- package/__tests__/fixtures/keys.ts +0 -60
- package/__tests__/helpers/buffer-utils.ts +0 -11
- package/__tests__/helpers/index.ts +0 -2
- package/__tests__/helpers/jwe-adapter.ts +0 -123
- package/__tests__/jose-jwe.test.ts +0 -463
- package/__tests__/noble-ciphers.test.ts +0 -208
- package/dist/mocks/index.d.ts +0 -2
- package/dist/mocks/index.d.ts.map +0 -1
- package/dist/mocks/index.js +0 -6
- package/dist/mocks/index.js.map +0 -1
- package/dist/mocks/mock-aes-kit.d.ts +0 -4
- package/dist/mocks/mock-aes-kit.d.ts.map +0 -1
- package/dist/mocks/mock-aes-kit.js +0 -74
- package/dist/mocks/mock-aes-kit.js.map +0 -1
- package/jest.config.interop.mjs +0 -24
- package/tsconfig.interop.json +0 -9
package/dist/classes/AesKit.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const encrypt_serialised_1 = require("../internal/utils/encrypt-serialised");
|
|
12
|
-
const encrypt_tokenised_1 = require("../internal/utils/encrypt-tokenised");
|
|
13
|
-
class AesKit {
|
|
1
|
+
import { isEqual } from "@lindorm/is";
|
|
2
|
+
import { AesError } from "../errors/index.js";
|
|
3
|
+
import { isAesTokenised, parseAes } from "../utils/index.js";
|
|
4
|
+
import { decryptAes, encryptAes } from "../internal/utils/encryption.js";
|
|
5
|
+
import { prepareAesEncryption } from "../internal/utils/prepare-encryption.js";
|
|
6
|
+
import { calculateContentType } from "../internal/utils/content.js";
|
|
7
|
+
import { encryptEncoded } from "../internal/utils/encrypt-encoded.js";
|
|
8
|
+
import { encryptSerialised } from "../internal/utils/encrypt-serialised.js";
|
|
9
|
+
import { encryptTokenised } from "../internal/utils/encrypt-tokenised.js";
|
|
10
|
+
export class AesKit {
|
|
14
11
|
encryption;
|
|
15
12
|
kryptos;
|
|
16
13
|
constructor(options) {
|
|
@@ -21,58 +18,58 @@ class AesKit {
|
|
|
21
18
|
try {
|
|
22
19
|
switch (mode) {
|
|
23
20
|
case "encoded":
|
|
24
|
-
return
|
|
21
|
+
return encryptEncoded({
|
|
25
22
|
data,
|
|
26
23
|
encryption: this.encryption,
|
|
27
24
|
kryptos: this.kryptos,
|
|
28
25
|
});
|
|
29
26
|
case "record":
|
|
30
|
-
return
|
|
27
|
+
return encryptAes({
|
|
31
28
|
data,
|
|
32
29
|
encryption: this.encryption,
|
|
33
30
|
kryptos: this.kryptos,
|
|
34
31
|
});
|
|
35
32
|
case "serialised":
|
|
36
|
-
return
|
|
33
|
+
return encryptSerialised({
|
|
37
34
|
data,
|
|
38
35
|
encryption: this.encryption,
|
|
39
36
|
kryptos: this.kryptos,
|
|
40
37
|
});
|
|
41
38
|
case "tokenised":
|
|
42
|
-
return
|
|
39
|
+
return encryptTokenised({
|
|
43
40
|
data,
|
|
44
41
|
encryption: this.encryption,
|
|
45
42
|
kryptos: this.kryptos,
|
|
46
43
|
});
|
|
47
44
|
default:
|
|
48
|
-
throw new
|
|
45
|
+
throw new AesError("Invalid encryption mode");
|
|
49
46
|
}
|
|
50
47
|
}
|
|
51
48
|
catch (error) {
|
|
52
|
-
if (error instanceof
|
|
49
|
+
if (error instanceof AesError)
|
|
53
50
|
throw error;
|
|
54
|
-
throw new
|
|
51
|
+
throw new AesError("AES encryption failed", { error: error });
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
54
|
decrypt(data, options) {
|
|
58
55
|
try {
|
|
59
|
-
const parsed =
|
|
56
|
+
const parsed = parseAes(data);
|
|
60
57
|
const aad = parsed.aad ?? options?.aad;
|
|
61
|
-
return
|
|
58
|
+
return decryptAes({
|
|
62
59
|
...parsed,
|
|
63
60
|
aad,
|
|
64
61
|
kryptos: this.kryptos,
|
|
65
62
|
});
|
|
66
63
|
}
|
|
67
64
|
catch (error) {
|
|
68
|
-
if (error instanceof
|
|
65
|
+
if (error instanceof AesError)
|
|
69
66
|
throw error;
|
|
70
|
-
throw new
|
|
67
|
+
throw new AesError("AES decryption failed", { error: error });
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
verify(input, data, options) {
|
|
74
71
|
try {
|
|
75
|
-
return
|
|
72
|
+
return isEqual(input, this.decrypt(data, options));
|
|
76
73
|
}
|
|
77
74
|
catch (_error) {
|
|
78
75
|
return false;
|
|
@@ -81,27 +78,26 @@ class AesKit {
|
|
|
81
78
|
assert(input, data, options) {
|
|
82
79
|
if (this.verify(input, data, options))
|
|
83
80
|
return;
|
|
84
|
-
throw new
|
|
81
|
+
throw new AesError("Invalid AES cipher");
|
|
85
82
|
}
|
|
86
83
|
prepareEncryption() {
|
|
87
84
|
try {
|
|
88
|
-
return
|
|
85
|
+
return prepareAesEncryption({ encryption: this.encryption, kryptos: this.kryptos });
|
|
89
86
|
}
|
|
90
87
|
catch (error) {
|
|
91
|
-
if (error instanceof
|
|
88
|
+
if (error instanceof AesError)
|
|
92
89
|
throw error;
|
|
93
|
-
throw new
|
|
90
|
+
throw new AesError("AES prepare encryption failed", { error: error });
|
|
94
91
|
}
|
|
95
92
|
}
|
|
96
93
|
static contentType(input) {
|
|
97
|
-
return
|
|
94
|
+
return calculateContentType(input);
|
|
98
95
|
}
|
|
99
96
|
static isAesTokenised(input) {
|
|
100
|
-
return
|
|
97
|
+
return isAesTokenised(input);
|
|
101
98
|
}
|
|
102
99
|
static parse(data) {
|
|
103
|
-
return
|
|
100
|
+
return parseAes(data);
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
|
-
exports.AesKit = AesKit;
|
|
107
103
|
//# sourceMappingURL=AesKit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AesKit.js","sourceRoot":"","sources":["../../src/classes/AesKit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AesKit.js","sourceRoot":"","sources":["../../src/classes/AesKit.ts"],"names":[],"mappings":"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"}
|
package/dist/classes/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./AesKit";
|
|
1
|
+
export * from "./AesKit.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
package/dist/classes/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
export * from "./AesKit.js";
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/classes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
package/dist/errors/AesError.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.AesError = void 0;
|
|
4
|
-
const errors_1 = require("@lindorm/errors");
|
|
5
|
-
class AesError extends errors_1.LindormError {
|
|
1
|
+
import { LindormError } from "@lindorm/errors";
|
|
2
|
+
export class AesError extends LindormError {
|
|
6
3
|
}
|
|
7
|
-
exports.AesError = AesError;
|
|
8
4
|
//# sourceMappingURL=AesError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AesError.js","sourceRoot":"","sources":["../../src/errors/AesError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AesError.js","sourceRoot":"","sources":["../../src/errors/AesError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,QAAS,SAAQ,YAAY;CAAG"}
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./AesError";
|
|
1
|
+
export * from "./AesError.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
package/dist/errors/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
export * from "./AesError.js";
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
package/dist/errors/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export * from "./classes";
|
|
2
|
-
export * from "./errors";
|
|
3
|
-
export * from "./interfaces";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./utils";
|
|
1
|
+
export * from "./classes/index.js";
|
|
2
|
+
export * from "./errors/index.js";
|
|
3
|
+
export * from "./interfaces/index.js";
|
|
4
|
+
export * from "./types/index.js";
|
|
5
|
+
export * from "./utils/index.js";
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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("./errors"), exports);
|
|
19
|
-
__exportStar(require("./interfaces"), exports);
|
|
20
|
-
__exportStar(require("./mocks"), exports);
|
|
21
|
-
__exportStar(require("./types"), exports);
|
|
22
|
-
__exportStar(require("./utils"), exports);
|
|
1
|
+
export * from "./classes/index.js";
|
|
2
|
+
export * from "./errors/index.js";
|
|
3
|
+
export * from "./interfaces/index.js";
|
|
4
|
+
export * from "./types/index.js";
|
|
5
|
+
export * from "./utils/index.js";
|
|
23
6
|
//# 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":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IKryptos } from "@lindorm/kryptos";
|
|
2
|
-
import { AesContent, AesDecryptionRecord, AesEncryptionRecord, SerialisedAesDecryption, SerialisedAesEncryption } from "../types";
|
|
3
|
-
import { PreparedEncryption } from "../internal/types/prepared-encryption";
|
|
1
|
+
import type { IKryptos } from "@lindorm/kryptos";
|
|
2
|
+
import type { AesContent, AesDecryptionRecord, AesEncryptionRecord, SerialisedAesDecryption, SerialisedAesEncryption } from "../types/index.js";
|
|
3
|
+
import type { PreparedEncryption } from "../internal/types/prepared-encryption.js";
|
|
4
4
|
export type AesOperationOptions = {
|
|
5
5
|
aad?: Buffer;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AesKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/AesKit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"AesKit.d.ts","sourceRoot":"","sources":["../../src/interfaces/AesKit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAEnF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,QAAQ,CAAC;IAElB,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;IACtF,OAAO,CACL,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,QAAQ,EACd,OAAO,CAAC,EAAE,mBAAmB,GAC5B,mBAAmB,CAAC;IACvB,OAAO,CACL,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,YAAY,EAClB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,uBAAuB,CAAC;IAC3B,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;IAEvF,OAAO,CAAC,CAAC,SAAS,UAAU,GAAG,MAAM,EACnC,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,EAC5D,OAAO,CAAC,EAAE,mBAAmB,GAC5B,CAAC,CAAC;IACL,MAAM,CACJ,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,EAC5D,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC;IACX,MAAM,CACJ,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,EAC5D,OAAO,CAAC,EAAE,mBAAmB,GAC5B,IAAI,CAAC;IAER,iBAAiB,IAAI,kBAAkB,CAAC;CACzC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./AesKit";
|
|
1
|
+
export * from "./AesKit.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
export * from "./AesKit.js";
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports.AES_FORMAT_VERSION = "1.0";
|
|
5
|
-
exports.AES_FORMAT_MAJOR = 1;
|
|
6
|
-
exports.LATEST_AES_VERSION = exports.AES_FORMAT_VERSION;
|
|
1
|
+
export const AES_FORMAT_VERSION = "1.0";
|
|
2
|
+
export const AES_FORMAT_MAJOR = 1;
|
|
3
|
+
export const LATEST_AES_VERSION = AES_FORMAT_VERSION;
|
|
7
4
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/internal/constants/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/internal/constants/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACxC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,kBAAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
-
import { AesContentType } from "../../types/content";
|
|
3
|
-
import { PublicEncryptionJwk } from "../../types/types";
|
|
4
|
-
import { AesEncryptionOptions, SerialisedAesDecryption } from "../../types/aes-decryption-data";
|
|
1
|
+
import type { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
+
import type { AesContentType } from "../../types/content.js";
|
|
3
|
+
import type { PublicEncryptionJwk } from "../../types/types.js";
|
|
4
|
+
import type { AesEncryptionOptions, SerialisedAesDecryption } from "../../types/aes-decryption-data.js";
|
|
5
5
|
export type PrivateAesEncryptionOptions = AesEncryptionOptions & {
|
|
6
6
|
kryptos: IKryptos;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aes-data.d.ts","sourceRoot":"","sources":["../../../src/internal/types/aes-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"aes-data.d.ts","sourceRoot":"","sources":["../../../src/internal/types/aes-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,GAAG;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AAQvF,MAAM,MAAM,2BAA2B,GAAG;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,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;AAEF,MAAM,MAAM,qCAAqC,GAAG,uBAAuB,GAAG;IAC5E,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
-
import { CipherGCM, Cipheriv, DecipherGCM, Decipheriv } from "crypto";
|
|
1
|
+
import type { KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
+
import { type CipherGCM, Cipheriv, type DecipherGCM, Decipheriv } from "crypto";
|
|
3
3
|
export type GetAuthTagOptions = {
|
|
4
4
|
aad?: Buffer;
|
|
5
5
|
cipher: Cipheriv | CipherGCM;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-tag.d.ts","sourceRoot":"","sources":["../../../src/internal/types/auth-tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-tag.d.ts","sourceRoot":"","sources":["../../../src/internal/types/auth-tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,KAAK,SAAS,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,UAAU,GAAG,WAAW,CAAC;IACnC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-tag.js","sourceRoot":"","sources":["../../../src/internal/types/auth-tag.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"auth-tag.js","sourceRoot":"","sources":["../../../src/internal/types/auth-tag.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,QAAQ,EAAoB,UAAU,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
-
import { PublicEncryptionJwk } from "../../types/types";
|
|
1
|
+
import type { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
+
import type { PublicEncryptionJwk } from "../../types/types.js";
|
|
3
3
|
export type CreateCekOptions = {
|
|
4
4
|
encryption: KryptosEncryption;
|
|
5
5
|
kryptos: IKryptos;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-encryption-key.d.ts","sourceRoot":"","sources":["../../../src/internal/types/content-encryption-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"content-encryption-key.d.ts","sourceRoot":"","sources":["../../../src/internal/types/content-encryption-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,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,iBAAiB,GAAG;IAC9B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,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;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-wrap.d.ts","sourceRoot":"","sources":["../../../src/internal/types/key-wrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"key-wrap.d.ts","sourceRoot":"","sources":["../../../src/internal/types/key-wrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,QAAQ,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
-
import { AesContent, AesContentType } from "../../types/content";
|
|
3
|
-
import { PublicEncryptionJwk } from "../../types/types";
|
|
1
|
+
import type { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
+
import type { AesContent, AesContentType } from "../../types/content.js";
|
|
3
|
+
import type { PublicEncryptionJwk } from "../../types/types.js";
|
|
4
4
|
export type PrepareEncryptionOptions = {
|
|
5
5
|
encryption?: KryptosEncryption;
|
|
6
6
|
kryptos: IKryptos;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepared-encryption.d.ts","sourceRoot":"","sources":["../../../src/internal/types/prepared-encryption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"prepared-encryption.d.ts","sourceRoot":"","sources":["../../../src/internal/types/prepared-encryption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oBAAoB,EAAE,MAAM,CAAC;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,cAAc,CAAC;IAC5B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,8BAA8B,CAAC;IAC7C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,oBAAoB,CAAC;CAC7E,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { KryptosAlgorithm, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
-
import { AesContentType } from "../../types/content";
|
|
3
|
-
import { PublicEncryptionJwk } from "../../types/types";
|
|
1
|
+
import type { KryptosAlgorithm, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
+
import type { AesContentType } from "../../types/content.js";
|
|
3
|
+
import type { PublicEncryptionJwk } from "../../types/types.js";
|
|
4
4
|
export type AesHeaderInput = {
|
|
5
5
|
algorithm: KryptosAlgorithm;
|
|
6
6
|
contentType: AesContentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aes-header.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/aes-header.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"aes-header.d.ts","sourceRoot":"","sources":["../../../src/internal/utils/aes-header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,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;CAC9B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,gBAAgB,CAAC;IACtB,GAAG,EAAE,cAAc,CAAC;IACpB,GAAG,EAAE,iBAAiB,CAAC;IACvB,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAYF,eAAO,MAAM,cAAc,GAAI,SAAS,cAAc,KAAG,SAgBrD,CAAC;AAEL,eAAO,MAAM,eAAe,GAAI,QAAQ,SAAS,KAAG,MAGnD,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,WAAW,MAAM,KAAG,SAoBnD,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,KAAG,MAAyC,CAAC;AAEzF,eAAO,MAAM,wBAAwB,GACnC,QAAQ,SAAS,KAChB;IACD,SAAS,EAAE,gBAAgB,CAAC;IAC5B,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,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,OAAO,EAAE,MAAM,CAAC;CAYhB,CAAC"}
|