@lindorm/aes 0.5.4 → 0.6.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.
- package/CHANGELOG.md +30 -0
- package/MERMAID.md +155 -0
- package/README.md +365 -199
- package/__tests__/INTEROP-RESULTS.md +66 -0
- package/__tests__/esm-smoke.test.ts +15 -0
- package/__tests__/fixtures/keys.ts +60 -0
- package/__tests__/helpers/buffer-utils.ts +11 -0
- package/__tests__/helpers/index.ts +2 -0
- package/__tests__/helpers/jwe-adapter.ts +117 -0
- package/__tests__/jose-jwe.test.ts +463 -0
- package/__tests__/noble-ciphers.test.ts +208 -0
- package/dist/classes/AesKit.d.ts +10 -8
- package/dist/classes/AesKit.d.ts.map +1 -1
- package/dist/classes/AesKit.js +73 -34
- package/dist/classes/AesKit.js.map +1 -1
- package/dist/constants/private/index.d.ts +0 -1
- package/dist/constants/private/index.d.ts.map +1 -1
- package/dist/constants/private/index.js +0 -1
- package/dist/constants/private/index.js.map +1 -1
- package/dist/constants/private/version.d.ts +3 -1
- package/dist/constants/private/version.d.ts.map +1 -1
- package/dist/constants/private/version.js +4 -2
- package/dist/constants/private/version.js.map +1 -1
- package/dist/interfaces/AesKit.d.ts +12 -7
- package/dist/interfaces/AesKit.d.ts.map +1 -1
- package/dist/mocks/mock-aes-kit.d.ts.map +1 -1
- package/dist/mocks/mock-aes-kit.js +12 -2
- package/dist/mocks/mock-aes-kit.js.map +1 -1
- package/dist/types/aes-decryption-data.d.ts +26 -17
- package/dist/types/aes-decryption-data.d.ts.map +1 -1
- package/dist/types/aes-encryption-data.d.ts +7 -17
- package/dist/types/aes-encryption-data.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/private/aes-data.d.ts.map +1 -1
- package/dist/types/private/aes-key-derivation.d.ts +1 -1
- package/dist/types/private/aes-key-derivation.d.ts.map +1 -1
- package/dist/types/private/auth-tag.d.ts +6 -3
- package/dist/types/private/auth-tag.d.ts.map +1 -1
- package/dist/types/private/content-encryption-key.d.ts +4 -2
- package/dist/types/private/content-encryption-key.d.ts.map +1 -1
- package/dist/types/private/index.d.ts +1 -1
- package/dist/types/private/index.d.ts.map +1 -1
- package/dist/types/private/index.js +1 -1
- package/dist/types/private/index.js.map +1 -1
- package/dist/types/private/prepared-encryption.d.ts +35 -0
- package/dist/types/private/prepared-encryption.d.ts.map +1 -0
- package/dist/types/private/{aes-string.js → prepared-encryption.js} +1 -1
- package/dist/types/private/prepared-encryption.js.map +1 -0
- package/dist/utils/is-aes.d.ts.map +1 -1
- package/dist/utils/is-aes.js +1 -5
- package/dist/utils/is-aes.js.map +1 -1
- package/dist/utils/parse-aes.js +3 -3
- package/dist/utils/parse-aes.js.map +1 -1
- package/dist/utils/private/aes-header.d.ts +42 -0
- package/dist/utils/private/aes-header.d.ts.map +1 -0
- package/dist/utils/private/aes-header.js +75 -0
- package/dist/utils/private/aes-header.js.map +1 -0
- package/dist/utils/private/calculate/calculate-content-encryption-key-size.js +3 -3
- package/dist/utils/private/calculate/calculate-key-wrap-encryption.d.ts.map +1 -1
- package/dist/utils/private/calculate/calculate-key-wrap-encryption.js +2 -1
- package/dist/utils/private/calculate/calculate-key-wrap-encryption.js.map +1 -1
- package/dist/utils/private/data/auth-tag-hmac.d.ts +2 -2
- package/dist/utils/private/data/auth-tag-hmac.d.ts.map +1 -1
- package/dist/utils/private/data/auth-tag-hmac.js +12 -4
- package/dist/utils/private/data/auth-tag-hmac.js.map +1 -1
- package/dist/utils/private/data/auth-tag.d.ts +2 -2
- package/dist/utils/private/data/auth-tag.d.ts.map +1 -1
- package/dist/utils/private/data/auth-tag.js +4 -2
- package/dist/utils/private/data/auth-tag.js.map +1 -1
- package/dist/utils/private/data/split-content-encryption-key.d.ts.map +1 -1
- package/dist/utils/private/data/split-content-encryption-key.js +6 -2
- package/dist/utils/private/data/split-content-encryption-key.js.map +1 -1
- package/dist/utils/private/diffie-hellman/diffie-hellman-key-wrap.d.ts +2 -2
- package/dist/utils/private/diffie-hellman/diffie-hellman-key-wrap.d.ts.map +1 -1
- package/dist/utils/private/diffie-hellman/diffie-hellman-key-wrap.js +12 -8
- package/dist/utils/private/diffie-hellman/diffie-hellman-key-wrap.js.map +1 -1
- package/dist/utils/private/diffie-hellman/diffie-hellman.d.ts +2 -2
- package/dist/utils/private/diffie-hellman/diffie-hellman.d.ts.map +1 -1
- package/dist/utils/private/diffie-hellman/diffie-hellman.js +12 -8
- package/dist/utils/private/diffie-hellman/diffie-hellman.js.map +1 -1
- package/dist/utils/private/diffie-hellman/shared-secret.d.ts.map +1 -1
- package/dist/utils/private/diffie-hellman/shared-secret.js +5 -1
- package/dist/utils/private/diffie-hellman/shared-secret.js.map +1 -1
- package/dist/utils/private/encoded-aes.d.ts +2 -2
- package/dist/utils/private/encoded-aes.d.ts.map +1 -1
- package/dist/utils/private/encoded-aes.js +86 -149
- package/dist/utils/private/encoded-aes.js.map +1 -1
- package/dist/utils/private/encrypt-content.d.ts +3 -0
- package/dist/utils/private/encrypt-content.d.ts.map +1 -0
- package/dist/utils/private/encrypt-content.js +35 -0
- package/dist/utils/private/encrypt-content.js.map +1 -0
- package/dist/utils/private/encrypt-encoded.d.ts +9 -0
- package/dist/utils/private/encrypt-encoded.d.ts.map +1 -0
- package/dist/utils/private/encrypt-encoded.js +53 -0
- package/dist/utils/private/encrypt-encoded.js.map +1 -0
- package/dist/utils/private/encrypt-serialised.d.ts +9 -0
- package/dist/utils/private/encrypt-serialised.d.ts.map +1 -0
- package/dist/utils/private/encrypt-serialised.js +48 -0
- package/dist/utils/private/encrypt-serialised.js.map +1 -0
- package/dist/utils/private/encrypt-tokenised.d.ts +9 -0
- package/dist/utils/private/encrypt-tokenised.d.ts.map +1 -0
- package/dist/utils/private/encrypt-tokenised.js +45 -0
- package/dist/utils/private/encrypt-tokenised.js.map +1 -0
- package/dist/utils/private/encryption.d.ts.map +1 -1
- package/dist/utils/private/encryption.js +27 -27
- package/dist/utils/private/encryption.js.map +1 -1
- package/dist/utils/private/index.d.ts +6 -0
- package/dist/utils/private/index.d.ts.map +1 -1
- package/dist/utils/private/index.js +6 -0
- package/dist/utils/private/index.js.map +1 -1
- package/dist/utils/private/key-derivation/concat-kdf.d.ts +14 -0
- package/dist/utils/private/key-derivation/concat-kdf.d.ts.map +1 -0
- package/dist/utils/private/key-derivation/concat-kdf.js +26 -0
- package/dist/utils/private/key-derivation/concat-kdf.js.map +1 -0
- package/dist/utils/private/key-derivation/index.d.ts +1 -1
- package/dist/utils/private/key-derivation/index.d.ts.map +1 -1
- package/dist/utils/private/key-derivation/index.js +1 -1
- package/dist/utils/private/key-derivation/index.js.map +1 -1
- package/dist/utils/private/key-derivation/pbkdf.d.ts +1 -0
- package/dist/utils/private/key-derivation/pbkdf.d.ts.map +1 -1
- package/dist/utils/private/key-derivation/pbkdf.js +13 -2
- package/dist/utils/private/key-derivation/pbkdf.js.map +1 -1
- package/dist/utils/private/key-wrap/ecb-key-wrap.d.ts.map +1 -1
- package/dist/utils/private/key-wrap/ecb-key-wrap.js +10 -3
- package/dist/utils/private/key-wrap/ecb-key-wrap.js.map +1 -1
- package/dist/utils/private/key-wrap/gcm-key-wrap.d.ts.map +1 -1
- package/dist/utils/private/key-wrap/gcm-key-wrap.js +6 -0
- package/dist/utils/private/key-wrap/gcm-key-wrap.js.map +1 -1
- package/dist/utils/private/oct/get-oct-key-key-wrap.d.ts +1 -1
- package/dist/utils/private/oct/get-oct-key-key-wrap.d.ts.map +1 -1
- package/dist/utils/private/oct/get-oct-key-key-wrap.js +7 -14
- package/dist/utils/private/oct/get-oct-key-key-wrap.js.map +1 -1
- package/dist/utils/private/oct/get-oct-pbkdf-key-wrap-keys.d.ts.map +1 -1
- package/dist/utils/private/oct/get-oct-pbkdf-key-wrap-keys.js +2 -0
- package/dist/utils/private/oct/get-oct-pbkdf-key-wrap-keys.js.map +1 -1
- package/dist/utils/private/prepare-encryption.d.ts +3 -0
- package/dist/utils/private/prepare-encryption.d.ts.map +1 -0
- package/dist/utils/private/prepare-encryption.js +27 -0
- package/dist/utils/private/prepare-encryption.js.map +1 -0
- package/dist/utils/private/serialised-aes.d.ts.map +1 -1
- package/dist/utils/private/serialised-aes.js +38 -46
- package/dist/utils/private/serialised-aes.js.map +1 -1
- package/dist/utils/private/tokenised-aes.d.ts +3 -3
- package/dist/utils/private/tokenised-aes.d.ts.map +1 -1
- package/dist/utils/private/tokenised-aes.js +73 -55
- package/dist/utils/private/tokenised-aes.js.map +1 -1
- package/dist/utils/private/validate-version.d.ts +2 -0
- package/dist/utils/private/validate-version.d.ts.map +1 -0
- package/dist/utils/private/validate-version.js +27 -0
- package/dist/utils/private/validate-version.js.map +1 -0
- package/jest.config.interop.mjs +24 -0
- package/package.json +16 -15
- package/tsconfig.interop.json +9 -0
- package/dist/constants/private/format.d.ts +0 -2
- package/dist/constants/private/format.d.ts.map +0 -1
- package/dist/constants/private/format.js +0 -5
- package/dist/constants/private/format.js.map +0 -1
- package/dist/types/private/aes-string.d.ts +0 -21
- package/dist/types/private/aes-string.d.ts.map +0 -1
- package/dist/types/private/aes-string.js.map +0 -1
- package/dist/utils/private/key-derivation/hkdf.d.ts +0 -13
- package/dist/utils/private/key-derivation/hkdf.d.ts.map +0 -1
- package/dist/utils/private/key-derivation/hkdf.js +0 -12
- package/dist/utils/private/key-derivation/hkdf.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AesKit.d.ts","sourceRoot":"","sources":["../../src/classes/AesKit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AesKit.d.ts","sourceRoot":"","sources":["../../src/classes/AesKit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAqB,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EACL,UAAU,EACV,cAAc,EACd,mBAAmB,EAEnB,mBAAmB,EACnB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AK,IAAI,MAAM;WAI3C,KAAK,CACjB,IAAI,EAAE,mBAAmB,GAAG,uBAAuB,GAAG,MAAM,GAC3D,mBAAmB;CAGvB"}
|
package/dist/classes/AesKit.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AesKit = void 0;
|
|
4
|
+
const is_1 = require("@lindorm/is");
|
|
4
5
|
const errors_1 = require("../errors");
|
|
5
6
|
const utils_1 = require("../utils");
|
|
6
7
|
const private_1 = require("../utils/private");
|
|
7
8
|
const content_1 = require("../utils/private/content");
|
|
9
|
+
const encrypt_encoded_1 = require("../utils/private/encrypt-encoded");
|
|
10
|
+
const encrypt_serialised_1 = require("../utils/private/encrypt-serialised");
|
|
11
|
+
const encrypt_tokenised_1 = require("../utils/private/encrypt-tokenised");
|
|
8
12
|
class AesKit {
|
|
9
13
|
encryption;
|
|
10
14
|
kryptos;
|
|
@@ -12,47 +16,82 @@ class AesKit {
|
|
|
12
16
|
this.kryptos = options.kryptos;
|
|
13
17
|
this.encryption = options.encryption ?? options.kryptos.encryption ?? "A256GCM";
|
|
14
18
|
}
|
|
15
|
-
encrypt(data, mode = "encoded") {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
19
|
+
encrypt(data, mode = "encoded", _options) {
|
|
20
|
+
try {
|
|
21
|
+
switch (mode) {
|
|
22
|
+
case "encoded":
|
|
23
|
+
return (0, encrypt_encoded_1.encryptEncoded)({
|
|
24
|
+
data,
|
|
25
|
+
encryption: this.encryption,
|
|
26
|
+
kryptos: this.kryptos,
|
|
27
|
+
});
|
|
28
|
+
case "record":
|
|
29
|
+
return (0, private_1.encryptAes)({
|
|
30
|
+
data,
|
|
31
|
+
encryption: this.encryption,
|
|
32
|
+
kryptos: this.kryptos,
|
|
33
|
+
});
|
|
34
|
+
case "serialised":
|
|
35
|
+
return (0, encrypt_serialised_1.encryptSerialised)({
|
|
36
|
+
data,
|
|
37
|
+
encryption: this.encryption,
|
|
38
|
+
kryptos: this.kryptos,
|
|
39
|
+
});
|
|
40
|
+
case "tokenised":
|
|
41
|
+
return (0, encrypt_tokenised_1.encryptTokenised)({
|
|
42
|
+
data,
|
|
43
|
+
encryption: this.encryption,
|
|
44
|
+
kryptos: this.kryptos,
|
|
45
|
+
});
|
|
46
|
+
default:
|
|
47
|
+
throw new errors_1.AesError("Invalid encryption mode");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
if (error instanceof errors_1.AesError)
|
|
52
|
+
throw error;
|
|
53
|
+
throw new errors_1.AesError("AES encryption failed", { error: error });
|
|
43
54
|
}
|
|
44
55
|
}
|
|
45
|
-
decrypt(data) {
|
|
46
|
-
|
|
56
|
+
decrypt(data, options) {
|
|
57
|
+
try {
|
|
58
|
+
const parsed = (0, utils_1.parseAes)(data);
|
|
59
|
+
const aad = parsed.aad ?? options?.aad;
|
|
60
|
+
return (0, private_1.decryptAes)({
|
|
61
|
+
...parsed,
|
|
62
|
+
aad,
|
|
63
|
+
kryptos: this.kryptos,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof errors_1.AesError)
|
|
68
|
+
throw error;
|
|
69
|
+
throw new errors_1.AesError("AES decryption failed", { error: error });
|
|
70
|
+
}
|
|
47
71
|
}
|
|
48
|
-
verify(input, data) {
|
|
49
|
-
|
|
72
|
+
verify(input, data, options) {
|
|
73
|
+
try {
|
|
74
|
+
return (0, is_1.isEqual)(input, this.decrypt(data, options));
|
|
75
|
+
}
|
|
76
|
+
catch (_error) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
50
79
|
}
|
|
51
|
-
assert(input, data) {
|
|
52
|
-
if (this.verify(input, data))
|
|
80
|
+
assert(input, data, options) {
|
|
81
|
+
if (this.verify(input, data, options))
|
|
53
82
|
return;
|
|
54
83
|
throw new errors_1.AesError("Invalid AES cipher");
|
|
55
84
|
}
|
|
85
|
+
prepareEncryption() {
|
|
86
|
+
try {
|
|
87
|
+
return (0, private_1.prepareAesEncryption)({ encryption: this.encryption, kryptos: this.kryptos });
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (error instanceof errors_1.AesError)
|
|
91
|
+
throw error;
|
|
92
|
+
throw new errors_1.AesError("AES prepare encryption failed", { error: error });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
56
95
|
static contentType(input) {
|
|
57
96
|
return (0, content_1.calculateContentType)(input);
|
|
58
97
|
}
|
|
@@ -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":";;;AAAA,oCAAsC;AAEtC,sCAAqC;AAarC,oCAAoD;AACpD,8CAAgF;AAChF,sDAAgE;AAChE,sEAAkE;AAClE,4EAAwE;AACxE,0EAAsE;AAEtE,MAAa,MAAM;IACA,UAAU,CAAoB;IAC/B,OAAO,CAAW;IAElC,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;IAsBM,OAAO,CACZ,IAAgB,EAChB,OAA0B,SA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AAC,KAAU;QACrC,OAAO,IAAA,sBAAc,EAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAEM,MAAM,CAAC,KAAK,CACjB,IAA4D;QAE5D,OAAO,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IACxB,CAAC;CACF;AA9ID,wBA8IC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/private/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/private/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -14,6 +14,5 @@ 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);
|
|
18
17
|
__exportStar(require("./version"), exports);
|
|
19
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/private/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/private/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/constants/private/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/constants/private/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,eAAO,MAAM,kBAAkB,QAAqB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LATEST_AES_VERSION = void 0;
|
|
4
|
-
exports.
|
|
3
|
+
exports.LATEST_AES_VERSION = exports.AES_FORMAT_MAJOR = exports.AES_FORMAT_VERSION = void 0;
|
|
4
|
+
exports.AES_FORMAT_VERSION = "1.0";
|
|
5
|
+
exports.AES_FORMAT_MAJOR = 1;
|
|
6
|
+
exports.LATEST_AES_VERSION = exports.AES_FORMAT_VERSION;
|
|
5
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/constants/private/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/constants/private/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,KAAK,CAAC;AAC3B,QAAA,gBAAgB,GAAG,CAAC,CAAC;AACrB,QAAA,kBAAkB,GAAG,0BAAkB,CAAC"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { IKryptos } from "@lindorm/kryptos";
|
|
2
2
|
import { AesContent, AesDecryptionRecord, AesEncryptionRecord, SerialisedAesDecryption, SerialisedAesEncryption } from "../types";
|
|
3
|
+
import { PreparedEncryption } from "../types/private";
|
|
4
|
+
export type AesOperationOptions = {
|
|
5
|
+
aad?: Buffer;
|
|
6
|
+
};
|
|
3
7
|
export interface IAesKit {
|
|
4
8
|
kryptos: IKryptos;
|
|
5
|
-
encrypt(content: AesContent, mode?: "encoded"): string;
|
|
6
|
-
encrypt(content: AesContent, mode: "record"): AesEncryptionRecord;
|
|
7
|
-
encrypt(content: AesContent, mode: "serialised"): SerialisedAesEncryption;
|
|
8
|
-
encrypt(content: AesContent, mode: "tokenised"): string;
|
|
9
|
-
decrypt<T extends AesContent = string>(data: AesDecryptionRecord | SerialisedAesDecryption | string): T;
|
|
10
|
-
verify(input:
|
|
11
|
-
assert(input:
|
|
9
|
+
encrypt(content: AesContent, mode?: "encoded", options?: AesOperationOptions): string;
|
|
10
|
+
encrypt(content: AesContent, mode: "record", options?: AesOperationOptions): AesEncryptionRecord;
|
|
11
|
+
encrypt(content: AesContent, mode: "serialised", options?: AesOperationOptions): SerialisedAesEncryption;
|
|
12
|
+
encrypt(content: AesContent, mode: "tokenised", options?: AesOperationOptions): string;
|
|
13
|
+
decrypt<T extends AesContent = string>(data: AesDecryptionRecord | SerialisedAesDecryption | string, options?: AesOperationOptions): T;
|
|
14
|
+
verify(input: AesContent, data: AesDecryptionRecord | SerialisedAesDecryption | string, options?: AesOperationOptions): boolean;
|
|
15
|
+
assert(input: AesContent, data: AesDecryptionRecord | SerialisedAesDecryption | string, options?: AesOperationOptions): void;
|
|
16
|
+
prepareEncryption(): PreparedEncryption;
|
|
12
17
|
}
|
|
13
18
|
//# sourceMappingURL=AesKit.d.ts.map
|
|
@@ -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;AAC5C,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,UAAU,CAAC;
|
|
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,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAk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AAe,CAAC;AAExC,eAAO,MAAM,gBAAgB,QAAO,
|
|
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,OA2BlC,CAAC"}
|
|
@@ -6,14 +6,24 @@ const createMockAesKit = () => ({
|
|
|
6
6
|
kryptos: (0, kryptos_1.createMockKryptos)(),
|
|
7
7
|
decrypt: jest
|
|
8
8
|
.fn()
|
|
9
|
-
.mockImplementation((data) => Buffer.from(JSON.stringify(data), "base64").toString()),
|
|
9
|
+
.mockImplementation((data, _options) => Buffer.from(JSON.stringify(data), "base64").toString()),
|
|
10
10
|
encrypt: jest
|
|
11
11
|
.fn()
|
|
12
|
-
.mockImplementation((data, mode) => mode === "
|
|
12
|
+
.mockImplementation((data, mode, _options) => mode === "encoded"
|
|
13
13
|
? Buffer.from(data).toString("base64")
|
|
14
14
|
: { content: Buffer.from(data).toString("base64") }),
|
|
15
15
|
assert: jest.fn(),
|
|
16
16
|
verify: jest.fn().mockReturnValue(true),
|
|
17
|
+
prepareEncryption: jest.fn().mockReturnValue({
|
|
18
|
+
headerParams: {},
|
|
19
|
+
publicEncryptionKey: undefined,
|
|
20
|
+
encrypt: jest.fn().mockReturnValue({
|
|
21
|
+
authTag: Buffer.alloc(16),
|
|
22
|
+
content: Buffer.alloc(0),
|
|
23
|
+
contentType: "text/plain",
|
|
24
|
+
initialisationVector: Buffer.alloc(12),
|
|
25
|
+
}),
|
|
26
|
+
}),
|
|
17
27
|
});
|
|
18
28
|
exports.createMockAesKit = createMockAesKit;
|
|
19
29
|
//# sourceMappingURL=mock-aes-kit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock-aes-kit.js","sourceRoot":"","sources":["../../src/mocks/mock-aes-kit.ts"],"names":[],"mappings":";;;AAAA,8CAAqD;A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E,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACxB,WAAW,EAAE,YAAY;YACzB,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;SACvC,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AA3BU,QAAA,gBAAgB,oBA2B1B"}
|
|
@@ -3,16 +3,17 @@ import { AesContent, AesContentType } from "./content";
|
|
|
3
3
|
import { PublicEncryptionJwk } from "./types";
|
|
4
4
|
export type AesEncryptionMode = "encoded" | "record" | "serialised" | "tokenised";
|
|
5
5
|
export type AesEncryptionOptions = {
|
|
6
|
+
aad?: Buffer;
|
|
6
7
|
data: AesContent;
|
|
7
8
|
encryption?: KryptosEncryption;
|
|
8
9
|
};
|
|
9
10
|
export type AesDecryptionRecord = {
|
|
11
|
+
aad?: Buffer;
|
|
10
12
|
algorithm?: KryptosAlgorithm;
|
|
11
13
|
authTag?: Buffer;
|
|
12
14
|
content: Buffer;
|
|
13
15
|
contentType?: AesContentType;
|
|
14
16
|
encryption: KryptosEncryption;
|
|
15
|
-
hkdfSalt?: Buffer;
|
|
16
17
|
initialisationVector: Buffer;
|
|
17
18
|
keyId?: string;
|
|
18
19
|
pbkdfIterations?: number;
|
|
@@ -21,23 +22,31 @@ export type AesDecryptionRecord = {
|
|
|
21
22
|
publicEncryptionJwk?: PublicEncryptionJwk;
|
|
22
23
|
publicEncryptionKey?: Buffer;
|
|
23
24
|
publicEncryptionTag?: Buffer;
|
|
24
|
-
version?:
|
|
25
|
+
version?: string;
|
|
25
26
|
};
|
|
26
|
-
export type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
export type ParsedAesDecryptionRecord = {
|
|
28
|
+
aad: Buffer;
|
|
29
|
+
algorithm: KryptosAlgorithm;
|
|
30
|
+
authTag: Buffer;
|
|
31
|
+
content: Buffer;
|
|
32
|
+
contentType: AesContentType;
|
|
31
33
|
encryption: KryptosEncryption;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
initialisationVector: Buffer;
|
|
35
|
+
keyId: string;
|
|
36
|
+
pbkdfIterations: number | undefined;
|
|
37
|
+
pbkdfSalt: Buffer | undefined;
|
|
38
|
+
publicEncryptionIv: Buffer | undefined;
|
|
39
|
+
publicEncryptionJwk: PublicEncryptionJwk | undefined;
|
|
40
|
+
publicEncryptionKey: Buffer | undefined;
|
|
41
|
+
publicEncryptionTag: Buffer | undefined;
|
|
42
|
+
version: string;
|
|
43
|
+
};
|
|
44
|
+
export type SerialisedAesDecryption = {
|
|
45
|
+
cek?: string;
|
|
46
|
+
ciphertext: string;
|
|
47
|
+
header: string;
|
|
48
|
+
iv: string;
|
|
49
|
+
tag: string;
|
|
50
|
+
v: string;
|
|
42
51
|
};
|
|
43
52
|
//# sourceMappingURL=aes-decryption-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aes-decryption-data.d.ts","sourceRoot":"","sources":["../../src/types/aes-decryption-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACvD,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,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,CA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MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,gBAAgB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,oBAAoB,EAAE,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;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;CACX,CAAC"}
|
|
@@ -7,7 +7,6 @@ export type AesEncryptionRecord = {
|
|
|
7
7
|
content: Buffer;
|
|
8
8
|
contentType: AesContentType;
|
|
9
9
|
encryption: KryptosEncryption;
|
|
10
|
-
hkdfSalt: Buffer | undefined;
|
|
11
10
|
initialisationVector: Buffer;
|
|
12
11
|
keyId: string;
|
|
13
12
|
pbkdfIterations: number | undefined;
|
|
@@ -16,23 +15,14 @@ export type AesEncryptionRecord = {
|
|
|
16
15
|
publicEncryptionJwk: PublicEncryptionJwk | undefined;
|
|
17
16
|
publicEncryptionKey: Buffer | undefined;
|
|
18
17
|
publicEncryptionTag: Buffer | undefined;
|
|
19
|
-
version:
|
|
18
|
+
version: string;
|
|
20
19
|
};
|
|
21
20
|
export type SerialisedAesEncryption = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
initialisationVector: string;
|
|
29
|
-
keyId: string;
|
|
30
|
-
pbkdfIterations: number | undefined;
|
|
31
|
-
pbkdfSalt: string | undefined;
|
|
32
|
-
publicEncryptionIv: string | undefined;
|
|
33
|
-
publicEncryptionJwk: PublicEncryptionJwk | undefined;
|
|
34
|
-
publicEncryptionKey: string | undefined;
|
|
35
|
-
publicEncryptionTag: string | undefined;
|
|
36
|
-
version: number;
|
|
21
|
+
cek: string | undefined;
|
|
22
|
+
ciphertext: string;
|
|
23
|
+
header: string;
|
|
24
|
+
iv: string;
|
|
25
|
+
tag: string;
|
|
26
|
+
v: string;
|
|
37
27
|
};
|
|
38
28
|
//# 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,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,
|
|
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,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,gBAAgB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,oBAAoB,EAAE,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;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;CACX,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export * from "./aes-kit";
|
|
|
4
4
|
export * from "./content";
|
|
5
5
|
export * from "./curve";
|
|
6
6
|
export * from "./types";
|
|
7
|
+
export type { EncryptContentResult, PreparedEncryption, PreparedEncryptionHeaderParams, } from "./private/prepared-encryption";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,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,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,YAAY,EACV,oBAAoB,EACpB,kBAAkB,EAClB,8BAA8B,GAC/B,MAAM,+BAA+B,CAAC"}
|
|
@@ -1 +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,wBAAwB,CAAC;AAEhC,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,GAAG;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,GAAG;
|
|
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,wBAAwB,CAAC;AAEhC,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,GAAG;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEvF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,GAAG;IAC9D,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qCAAqC,GAAG,uBAAuB,GAAG;IAC5E,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type AesKeyDerivation = "dir" | "
|
|
1
|
+
export type AesKeyDerivation = "dir" | "pbkdf2";
|
|
2
2
|
//# sourceMappingURL=aes-key-derivation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aes-key-derivation.d.ts","sourceRoot":"","sources":["../../../src/types/private/aes-key-derivation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"aes-key-derivation.d.ts","sourceRoot":"","sources":["../../../src/types/private/aes-key-derivation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
-
import {
|
|
2
|
+
import { CipherGCM, Cipheriv, DecipherGCM, Decipheriv } from "crypto";
|
|
3
3
|
export type GetAuthTagOptions = {
|
|
4
|
-
|
|
4
|
+
aad?: Buffer;
|
|
5
|
+
cipher: Cipheriv | CipherGCM;
|
|
5
6
|
content: Buffer;
|
|
6
7
|
hashKey: Buffer;
|
|
7
8
|
encryption: KryptosEncryption;
|
|
8
9
|
initialisationVector: Buffer;
|
|
9
10
|
};
|
|
10
11
|
export type SetAuthTagOptions = {
|
|
12
|
+
aad?: Buffer;
|
|
11
13
|
authTag?: Buffer;
|
|
12
14
|
content: Buffer;
|
|
13
15
|
hashKey: Buffer;
|
|
14
|
-
decipher:
|
|
16
|
+
decipher: Decipheriv | DecipherGCM;
|
|
15
17
|
encryption: KryptosEncryption;
|
|
16
18
|
initialisationVector: Buffer;
|
|
17
19
|
};
|
|
18
20
|
export type CreateHmacAuthTag = {
|
|
21
|
+
aad?: Buffer;
|
|
19
22
|
content: Buffer;
|
|
20
23
|
encryption: KryptosEncryption;
|
|
21
24
|
hashKey: Buffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-tag.d.ts","sourceRoot":"","sources":["../../../src/types/private/auth-tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"auth-tag.d.ts","sourceRoot":"","sources":["../../../src/types/private/auth-tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEtE,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,12 +1,13 @@
|
|
|
1
1
|
import { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
2
|
import { PublicEncryptionJwk } from "../types";
|
|
3
3
|
export type CreateCekOptions = {
|
|
4
|
+
apu?: Buffer;
|
|
5
|
+
apv?: Buffer;
|
|
4
6
|
encryption: KryptosEncryption;
|
|
5
7
|
kryptos: IKryptos;
|
|
6
8
|
};
|
|
7
9
|
export type CreateCekResult = {
|
|
8
10
|
contentEncryptionKey: Buffer;
|
|
9
|
-
hkdfSalt?: Buffer;
|
|
10
11
|
pbkdfIterations?: number;
|
|
11
12
|
pbkdfSalt?: Buffer;
|
|
12
13
|
publicEncryptionIv?: Buffer;
|
|
@@ -15,8 +16,9 @@ export type CreateCekResult = {
|
|
|
15
16
|
publicEncryptionTag?: Buffer;
|
|
16
17
|
};
|
|
17
18
|
export type DecryptCekOptions = {
|
|
19
|
+
apu?: Buffer;
|
|
20
|
+
apv?: Buffer;
|
|
18
21
|
encryption: KryptosEncryption;
|
|
19
|
-
hkdfSalt?: Buffer;
|
|
20
22
|
kryptos: IKryptos;
|
|
21
23
|
pbkdfIterations?: number;
|
|
22
24
|
pbkdfSalt?: Buffer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-encryption-key.d.ts","sourceRoot":"","sources":["../../../src/types/private/content-encryption-key.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,iBAAiB,CAAC;IAC9B,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;I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CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./aes-data";
|
|
2
2
|
export * from "./aes-key-derivation";
|
|
3
|
-
export * from "./aes-string";
|
|
4
3
|
export * from "./auth-tag";
|
|
5
4
|
export * from "./content-encryption-key";
|
|
6
5
|
export * from "./key-wrap";
|
|
6
|
+
export * from "./prepared-encryption";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC"}
|
|
@@ -16,8 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./aes-data"), exports);
|
|
18
18
|
__exportStar(require("./aes-key-derivation"), exports);
|
|
19
|
-
__exportStar(require("./aes-string"), exports);
|
|
20
19
|
__exportStar(require("./auth-tag"), exports);
|
|
21
20
|
__exportStar(require("./content-encryption-key"), exports);
|
|
22
21
|
__exportStar(require("./key-wrap"), exports);
|
|
22
|
+
__exportStar(require("./prepared-encryption"), exports);
|
|
23
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/private/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,uDAAqC;AACrC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/private/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,uDAAqC;AACrC,6CAA2B;AAC3B,2DAAyC;AACzC,6CAA2B;AAC3B,wDAAsC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IKryptos, KryptosEncryption } from "@lindorm/kryptos";
|
|
2
|
+
import { AesContent, AesContentType } from "../content";
|
|
3
|
+
import { PublicEncryptionJwk } from "../types";
|
|
4
|
+
export type PrepareEncryptionOptions = {
|
|
5
|
+
encryption?: KryptosEncryption;
|
|
6
|
+
kryptos: IKryptos;
|
|
7
|
+
};
|
|
8
|
+
export type EncryptContentOptions = {
|
|
9
|
+
aad?: Buffer;
|
|
10
|
+
contentEncryptionKey: Buffer;
|
|
11
|
+
data: AesContent;
|
|
12
|
+
encryption: KryptosEncryption;
|
|
13
|
+
initialisationVector?: Buffer;
|
|
14
|
+
};
|
|
15
|
+
export type EncryptContentResult = {
|
|
16
|
+
authTag: Buffer;
|
|
17
|
+
content: Buffer;
|
|
18
|
+
contentType: AesContentType;
|
|
19
|
+
initialisationVector: Buffer;
|
|
20
|
+
};
|
|
21
|
+
export type PreparedEncryptionHeaderParams = {
|
|
22
|
+
publicEncryptionJwk?: PublicEncryptionJwk;
|
|
23
|
+
pbkdfIterations?: number;
|
|
24
|
+
pbkdfSalt?: Buffer;
|
|
25
|
+
publicEncryptionIv?: Buffer;
|
|
26
|
+
publicEncryptionTag?: Buffer;
|
|
27
|
+
};
|
|
28
|
+
export type PreparedEncryption = {
|
|
29
|
+
headerParams: PreparedEncryptionHeaderParams;
|
|
30
|
+
publicEncryptionKey?: Buffer;
|
|
31
|
+
encrypt(data: AesContent, options?: {
|
|
32
|
+
aad?: Buffer;
|
|
33
|
+
}): EncryptContentResult;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=prepared-encryption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepared-encryption.js","sourceRoot":"","sources":["../../../src/types/private/prepared-encryption.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-aes.d.ts","sourceRoot":"","sources":["../../src/utils/is-aes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExE,eAAO,MAAM,eAAe,GAC1B,MAAM,mBAAmB,GAAG,uBAAuB,KAClD,IAAI,IAAI,mBAAmE,CAAC;AAE/E,eAAO,MAAM,mBAAmB,GAC9B,SAAS,mBAAmB,GAAG,uBAAuB,KACrD,OAAO,IAAI,uBACqC,CAAC;AAEpD,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"is-aes.d.ts","sourceRoot":"","sources":["../../src/utils/is-aes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExE,eAAO,MAAM,eAAe,GAC1B,MAAM,mBAAmB,GAAG,uBAAuB,KAClD,IAAI,IAAI,mBAAmE,CAAC;AAE/E,eAAO,MAAM,mBAAmB,GAC9B,SAAS,mBAAmB,GAAG,uBAAuB,KACrD,OAAO,IAAI,uBACqC,CAAC;AAEpD,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,OACD,CAAC"}
|