tabris 3.9.0-dev.20220523 → 3.9.0-dev.20220526
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/boot.js +1 -1
- package/globals.d.ts +12 -2
- package/package.json +1 -1
- package/tabris.d.ts +1 -1
- package/tabris.js +38 -16
- package/tabris.min.js +1 -1
package/boot.js
CHANGED
package/globals.d.ts
CHANGED
|
@@ -997,8 +997,8 @@ declare class SubtleCrypto {
|
|
|
997
997
|
decrypt(algorithm: {name: 'AES-GCM', iv: ArrayBuffer | TypedArray, tagLength?: number}, key: CryptoKey, data: ArrayBuffer | TypedArray): Promise<ArrayBuffer>;
|
|
998
998
|
|
|
999
999
|
/**
|
|
1000
|
-
* Takes a master key and derives a secret key from it using the
|
|
1001
|
-
*
|
|
1000
|
+
* Takes a master key and derives a secret key from it using the Elliptic Curve Diffie-Hellman (ECDH)
|
|
1001
|
+
* algorithm.
|
|
1002
1002
|
* @param algorithm
|
|
1003
1003
|
* @param baseKey
|
|
1004
1004
|
* @param derivedKeyAlgorithm
|
|
@@ -1007,6 +1007,16 @@ declare class SubtleCrypto {
|
|
|
1007
1007
|
*/
|
|
1008
1008
|
deriveKey(algorithm: {name: 'ECDH', namedCurve: 'P-256', public: CryptoKey}, baseKey: CryptoKey, derivedKeyAlgorithm: {name: 'AES-GCM', length: number}, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
|
|
1009
1009
|
|
|
1010
|
+
/**
|
|
1011
|
+
* Takes a master key and derives a secret key from it using the HKDF algorithm.
|
|
1012
|
+
* @param algorithm
|
|
1013
|
+
* @param baseKey
|
|
1014
|
+
* @param derivedKeyAlgorithm
|
|
1015
|
+
* @param extractable
|
|
1016
|
+
* @param keyUsages
|
|
1017
|
+
*/
|
|
1018
|
+
deriveKey(algorithm: {name: 'HKDF', hash: 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512', salt: ArrayBuffer | TypedArray, info: ArrayBuffer | TypedArray}, baseKey: CryptoKey, derivedKeyAlgorithm: {name: 'AES-GCM', length: number}, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
|
|
1019
|
+
|
|
1010
1020
|
/**
|
|
1011
1021
|
* Provides the digest value of the given data as an ArrayBuffer. Fo this the method uses the hashing
|
|
1012
1022
|
* algorithms provided by the operating system.
|
package/package.json
CHANGED
package/tabris.d.ts
CHANGED
package/tabris.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Tabris.js 3.9.0-dev.
|
|
2
|
+
* Tabris.js 3.9.0-dev.20220526+0310
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014, 2020 EclipseSource Inc.
|
|
5
5
|
* All rights reserved.
|
|
@@ -5026,7 +5026,7 @@ class Tabris extends NativeObject {
|
|
|
5026
5026
|
this.$publishProxies();
|
|
5027
5027
|
}
|
|
5028
5028
|
get version() {
|
|
5029
|
-
return '3.9.0-dev.
|
|
5029
|
+
return '3.9.0-dev.20220526+0310';
|
|
5030
5030
|
}
|
|
5031
5031
|
get started() {
|
|
5032
5032
|
return !!this._started;
|
|
@@ -10428,15 +10428,30 @@ class _CryptoKey extends NativeObject {
|
|
|
10428
10428
|
}
|
|
10429
10429
|
derive(algorithm, baseKey, derivedKeyAlgorithm, extractable, keyUsages) {
|
|
10430
10430
|
return __awaiter(this, void 0, void 0, function* () {
|
|
10431
|
-
return new Promise$1((onSuccess, onError) =>
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10431
|
+
return new Promise$1((onSuccess, onError) => {
|
|
10432
|
+
if (algorithm.name === 'ECDH') {
|
|
10433
|
+
return this._nativeCall('derive', {
|
|
10434
|
+
algorithm: Object.assign(Object.assign({}, algorithm), { public: getCid(algorithm.public) }),
|
|
10435
|
+
baseKey: getCid(baseKey),
|
|
10436
|
+
derivedKeyAlgorithm,
|
|
10437
|
+
extractable,
|
|
10438
|
+
keyUsages,
|
|
10439
|
+
onSuccess,
|
|
10440
|
+
onError: wrapErrorCb(onError)
|
|
10441
|
+
});
|
|
10442
|
+
}
|
|
10443
|
+
else {
|
|
10444
|
+
return this._nativeCall('derive', {
|
|
10445
|
+
algorithm: Object.assign(Object.assign({}, algorithm), { salt: getBuffer(algorithm.salt), info: getBuffer(algorithm.info) }),
|
|
10446
|
+
baseKey: getCid(baseKey),
|
|
10447
|
+
derivedKeyAlgorithm,
|
|
10448
|
+
extractable,
|
|
10449
|
+
keyUsages,
|
|
10450
|
+
onSuccess,
|
|
10451
|
+
onError: wrapErrorCb(onError)
|
|
10452
|
+
});
|
|
10453
|
+
}
|
|
10454
|
+
});
|
|
10440
10455
|
});
|
|
10441
10456
|
}
|
|
10442
10457
|
generate(algorithm, extractable, keyUsages) {
|
|
@@ -10525,10 +10540,17 @@ class SubtleCrypto {
|
|
|
10525
10540
|
if (arguments.length !== 5) {
|
|
10526
10541
|
throw new TypeError(`Expected 5 arguments, got ${arguments.length}`);
|
|
10527
10542
|
}
|
|
10528
|
-
allowOnlyKeys(algorithm, ['name', 'namedCurve', 'public']);
|
|
10529
|
-
allowOnlyValues(algorithm.name, ['ECDH'], 'algorithm.name');
|
|
10530
|
-
|
|
10531
|
-
|
|
10543
|
+
allowOnlyKeys(algorithm, ['name', 'namedCurve', 'public', 'hash', 'salt', 'info']);
|
|
10544
|
+
allowOnlyValues(algorithm.name, ['ECDH', 'HKDF'], 'algorithm.name');
|
|
10545
|
+
if (algorithm.name === 'ECDH') {
|
|
10546
|
+
allowOnlyValues(algorithm.namedCurve, ['P-256'], 'algorithm.namedCurve');
|
|
10547
|
+
checkType(algorithm.public, CryptoKey, { name: 'algorithm.public' });
|
|
10548
|
+
}
|
|
10549
|
+
else if (algorithm.name === 'HKDF') {
|
|
10550
|
+
checkType(algorithm.hash, String, { name: 'algorithm.hash' });
|
|
10551
|
+
checkType(getBuffer(algorithm.salt), ArrayBuffer, { name: 'algorithm.salt' });
|
|
10552
|
+
checkType(getBuffer(algorithm.info), ArrayBuffer, { name: 'algorithm.info' });
|
|
10553
|
+
}
|
|
10532
10554
|
allowOnlyKeys(derivedKeyAlgorithm, ['name', 'length']);
|
|
10533
10555
|
allowOnlyValues(derivedKeyAlgorithm.name, ['AES-GCM'], 'derivedKeyAlgorithm.name');
|
|
10534
10556
|
checkType(derivedKeyAlgorithm.length, Number, { name: 'derivedKeyAlgorithm.length' });
|
|
@@ -13347,7 +13369,7 @@ function fetch(input, init) {
|
|
|
13347
13369
|
hr.dispose();
|
|
13348
13370
|
break;
|
|
13349
13371
|
case 'error':
|
|
13350
|
-
reject(new TypeError('Network request failed'));
|
|
13372
|
+
reject(new TypeError(event.message || 'Network request failed'));
|
|
13351
13373
|
hr.dispose();
|
|
13352
13374
|
break;
|
|
13353
13375
|
case 'timeout':
|