@solibo/solibo-sdk 1.6.7 → 1.6.8
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/KmLogging-logging.mjs +77 -77
- package/KotlinBigInteger-bignum.mjs +1099 -1099
- package/MultiplatformSettings-multiplatform-settings-test.mjs +18 -18
- package/MultiplatformSettings-multiplatform-settings.mjs +16 -16
- package/Stately-stately-concurrency.mjs +4 -4
- package/cryptography-kotlin-cryptography-bigint.mjs +26 -26
- package/cryptography-kotlin-cryptography-core.mjs +47 -47
- package/cryptography-kotlin-cryptography-provider-base.mjs +8 -8
- package/cryptography-kotlin-cryptography-provider-webcrypto.mjs +136 -136
- package/cryptography-kotlin-cryptography-random.mjs +15 -15
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs +118 -118
- package/cryptography-kotlin-cryptography-serialization-asn1.mjs +246 -246
- package/cryptography-kotlin-cryptography-serialization-pem.mjs +15 -15
- package/kotlin-kotlin-stdlib.mjs +20 -20
- package/kotlin-kotlin-stdlib.mjs.map +1 -1
- package/kotlinx-coroutines-core.mjs +7 -7
- package/kotlinx-coroutines-core.mjs.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1053 -1053
- package/ktor-ktor-client-auth.mjs +230 -230
- package/ktor-ktor-client-content-negotiation.mjs +111 -111
- package/ktor-ktor-client-core.mjs +1265 -1260
- package/ktor-ktor-client-core.mjs.map +1 -1
- package/ktor-ktor-client-encoding.mjs +81 -81
- package/ktor-ktor-client-logging.mjs +522 -522
- package/ktor-ktor-client-mock.mjs +39 -39
- package/ktor-ktor-serialization-kotlinx-json.mjs +5 -5
- package/ktor-ktor-serialization-kotlinx.mjs +93 -93
- package/ktor-ktor-websockets.mjs +2 -2
- package/package.json +1 -1
- package/solibo-sdk-sdk-home-api.mjs +25808 -25808
- package/solibo-sdk-sdk.mjs +2946 -2901
- package/solibo-sdk-sdk.mjs.map +1 -1
|
@@ -166,8 +166,8 @@ function WebCryptoCryptographyProvider() {
|
|
|
166
166
|
WebCryptoCryptographyProvider_instance = this;
|
|
167
167
|
CryptographyProvider.call(this);
|
|
168
168
|
}
|
|
169
|
-
protoOf(WebCryptoCryptographyProvider).
|
|
170
|
-
var tmp = equals(identifier, SHA1_getInstance()) ? Companion_getInstance_11().
|
|
169
|
+
protoOf(WebCryptoCryptographyProvider).lsg = function (identifier) {
|
|
170
|
+
var tmp = equals(identifier, SHA1_getInstance()) ? Companion_getInstance_11().csl_1 : equals(identifier, SHA256_getInstance()) ? Companion_getInstance_11().dsl_1 : equals(identifier, SHA384_getInstance()) ? Companion_getInstance_11().esl_1 : equals(identifier, SHA512_getInstance()) ? Companion_getInstance_11().fsl_1 : equals(identifier, Companion_getInstance_9()) ? WebCryptoHmac_getInstance() : equals(identifier, Companion_getInstance_8()) ? WebCryptoAesCbc_getInstance() : equals(identifier, Companion_getInstance_7()) ? WebCryptoAesCtr_getInstance() : equals(identifier, Companion_getInstance_6()) ? WebCryptoAesGcm_getInstance() : equals(identifier, Companion_getInstance_5()) ? WebCryptoRsaOaep_getInstance() : equals(identifier, Companion_getInstance_4()) ? WebCryptoRsaPss_getInstance() : equals(identifier, Companion_getInstance_3()) ? WebCryptoRsaPkcs1_getInstance() : equals(identifier, Companion_getInstance_2()) ? WebCryptoEcdsa_getInstance() : equals(identifier, Companion_getInstance_1()) ? WebCryptoEcdh_getInstance() : equals(identifier, Companion_getInstance_0()) ? WebCryptoPbkdf2_instance : equals(identifier, Companion_getInstance()) ? WebCryptoHkdf_instance : null;
|
|
171
171
|
return (tmp == null ? true : isInterface(tmp, CryptographyAlgorithm)) ? tmp : THROW_CCE();
|
|
172
172
|
};
|
|
173
173
|
var WebCryptoCryptographyProvider_instance;
|
|
@@ -190,17 +190,17 @@ function _init_properties_WebCryptoCryptographyProvider_kt__i22tls() {
|
|
|
190
190
|
}
|
|
191
191
|
function AesKey(key) {
|
|
192
192
|
WebCryptoEncodableKey.call(this, key, AesKeyProcessor_getInstance());
|
|
193
|
-
this.
|
|
193
|
+
this.isl_1 = key;
|
|
194
194
|
}
|
|
195
195
|
function WebCryptoAes(algorithmName, keyWrapper) {
|
|
196
|
-
this.
|
|
197
|
-
this.
|
|
196
|
+
this.jsl_1 = algorithmName;
|
|
197
|
+
this.ksl_1 = keyWrapper;
|
|
198
198
|
}
|
|
199
199
|
function AesKeyProcessor() {
|
|
200
200
|
AesKeyProcessor_instance = this;
|
|
201
201
|
WebCryptoKeyProcessor.call(this);
|
|
202
202
|
}
|
|
203
|
-
protoOf(AesKeyProcessor).
|
|
203
|
+
protoOf(AesKeyProcessor).lsl = function (format) {
|
|
204
204
|
var tmp;
|
|
205
205
|
switch (format.a1_1) {
|
|
206
206
|
case 0:
|
|
@@ -215,14 +215,14 @@ protoOf(AesKeyProcessor).ksl = function (format) {
|
|
|
215
215
|
}
|
|
216
216
|
return tmp;
|
|
217
217
|
};
|
|
218
|
-
protoOf(AesKeyProcessor).
|
|
219
|
-
return this.
|
|
218
|
+
protoOf(AesKeyProcessor).msl = function (format) {
|
|
219
|
+
return this.lsl(format instanceof Format ? format : THROW_CCE());
|
|
220
220
|
};
|
|
221
|
-
protoOf(AesKeyProcessor).
|
|
221
|
+
protoOf(AesKeyProcessor).nsl = function (algorithm, format, key) {
|
|
222
222
|
return key;
|
|
223
223
|
};
|
|
224
|
-
protoOf(AesKeyProcessor).
|
|
225
|
-
return this.
|
|
224
|
+
protoOf(AesKeyProcessor).osl = function (algorithm, format, key) {
|
|
225
|
+
return this.nsl(algorithm, format instanceof Format ? format : THROW_CCE(), key);
|
|
226
226
|
};
|
|
227
227
|
var AesKeyProcessor_instance;
|
|
228
228
|
function AesKeyProcessor_getInstance() {
|
|
@@ -304,10 +304,10 @@ function WebCryptoAesGcm_getInstance() {
|
|
|
304
304
|
}
|
|
305
305
|
function Companion() {
|
|
306
306
|
Companion_instance_3 = this;
|
|
307
|
-
this.
|
|
308
|
-
this.
|
|
309
|
-
this.
|
|
310
|
-
this.
|
|
307
|
+
this.csl_1 = new WebCryptoDigest('SHA-1', SHA1_getInstance());
|
|
308
|
+
this.dsl_1 = new WebCryptoDigest('SHA-256', SHA256_getInstance());
|
|
309
|
+
this.esl_1 = new WebCryptoDigest('SHA-384', SHA384_getInstance());
|
|
310
|
+
this.fsl_1 = new WebCryptoDigest('SHA-512', SHA512_getInstance());
|
|
311
311
|
}
|
|
312
312
|
var Companion_instance_3;
|
|
313
313
|
function Companion_getInstance_11() {
|
|
@@ -317,52 +317,52 @@ function Companion_getInstance_11() {
|
|
|
317
317
|
}
|
|
318
318
|
function WebCryptoDigest(algorithm, id) {
|
|
319
319
|
Companion_getInstance_11();
|
|
320
|
-
this.
|
|
321
|
-
this.
|
|
320
|
+
this.psl_1 = algorithm;
|
|
321
|
+
this.qsl_1 = id;
|
|
322
322
|
}
|
|
323
|
-
protoOf(WebCryptoDigest).
|
|
323
|
+
protoOf(WebCryptoDigest).rsl = function () {
|
|
324
324
|
return this;
|
|
325
325
|
};
|
|
326
|
-
protoOf(WebCryptoDigest).
|
|
327
|
-
return WebCrypto_getInstance().
|
|
326
|
+
protoOf(WebCryptoDigest).csh = function (data, $completion) {
|
|
327
|
+
return WebCrypto_getInstance().tsl(this.psl_1, data, $completion);
|
|
328
328
|
};
|
|
329
|
-
protoOf(WebCryptoDigest).
|
|
329
|
+
protoOf(WebCryptoDigest).bsh = function () {
|
|
330
330
|
nonBlocking();
|
|
331
331
|
};
|
|
332
|
-
protoOf(WebCryptoDigest).
|
|
332
|
+
protoOf(WebCryptoDigest).dsh = function (data) {
|
|
333
333
|
nonBlocking();
|
|
334
334
|
};
|
|
335
335
|
function EcPublicKey(publicKey) {
|
|
336
336
|
WebCryptoEncodableKey.call(this, publicKey, EcPublicKeyProcessor_getInstance());
|
|
337
|
-
this.
|
|
337
|
+
this.wsl_1 = publicKey;
|
|
338
338
|
}
|
|
339
339
|
function EcPrivateKey_0(privateKey) {
|
|
340
340
|
WebCryptoEncodableKey.call(this, privateKey, EcPrivateKeyProcessor_getInstance());
|
|
341
|
-
this.
|
|
341
|
+
this.zsl_1 = privateKey;
|
|
342
342
|
}
|
|
343
343
|
function WebCryptoEc$keyPairWrapper$lambda($keyPairWrapper, this$0) {
|
|
344
344
|
return function (it) {
|
|
345
|
-
return $keyPairWrapper(this$0.
|
|
345
|
+
return $keyPairWrapper(this$0.dsm_1.bsm_1(it.publicKey), this$0.esm_1.bsm_1(it.privateKey));
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
348
|
function WebCryptoEc(algorithmName, publicKeyWrapper, privateKeyWrapper, keyPairWrapper) {
|
|
349
|
-
this.
|
|
350
|
-
this.
|
|
351
|
-
this.
|
|
349
|
+
this.csm_1 = algorithmName;
|
|
350
|
+
this.dsm_1 = publicKeyWrapper;
|
|
351
|
+
this.esm_1 = privateKeyWrapper;
|
|
352
352
|
var tmp = this;
|
|
353
|
-
var tmp0 = this.
|
|
353
|
+
var tmp0 = this.dsm_1.asm_1;
|
|
354
354
|
// Inline function 'kotlin.collections.plus' call
|
|
355
|
-
var elements = this.
|
|
355
|
+
var elements = this.esm_1.asm_1;
|
|
356
356
|
// Inline function 'kotlin.js.asDynamic' call
|
|
357
|
-
tmp.
|
|
357
|
+
tmp.fsm_1 = tmp0.concat(elements);
|
|
358
358
|
var tmp_0 = this;
|
|
359
|
-
tmp_0.
|
|
359
|
+
tmp_0.gsm_1 = WebCryptoEc$keyPairWrapper$lambda(keyPairWrapper, this);
|
|
360
360
|
}
|
|
361
361
|
function EcPublicKeyProcessor() {
|
|
362
362
|
EcPublicKeyProcessor_instance = this;
|
|
363
363
|
WebCryptoKeyProcessor.call(this);
|
|
364
364
|
}
|
|
365
|
-
protoOf(EcPublicKeyProcessor).
|
|
365
|
+
protoOf(EcPublicKeyProcessor).hsm = function (format) {
|
|
366
366
|
var tmp;
|
|
367
367
|
if (equals(format, JWK_getInstance())) {
|
|
368
368
|
tmp = 'jwk';
|
|
@@ -375,10 +375,10 @@ protoOf(EcPublicKeyProcessor).gsm = function (format) {
|
|
|
375
375
|
}
|
|
376
376
|
return tmp;
|
|
377
377
|
};
|
|
378
|
-
protoOf(EcPublicKeyProcessor).
|
|
379
|
-
return this.
|
|
378
|
+
protoOf(EcPublicKeyProcessor).msl = function (format) {
|
|
379
|
+
return this.hsm(format instanceof Format_0 ? format : THROW_CCE());
|
|
380
380
|
};
|
|
381
|
-
protoOf(EcPublicKeyProcessor).
|
|
381
|
+
protoOf(EcPublicKeyProcessor).ism = function (algorithm, format, key) {
|
|
382
382
|
var tmp;
|
|
383
383
|
if (equals(format, JWK_getInstance())) {
|
|
384
384
|
tmp = key;
|
|
@@ -387,14 +387,14 @@ protoOf(EcPublicKeyProcessor).hsm = function (algorithm, format, key) {
|
|
|
387
387
|
} else if (equals(format, DER_getInstance())) {
|
|
388
388
|
tmp = key;
|
|
389
389
|
} else if (equals(format, PEM_getInstance())) {
|
|
390
|
-
tmp = unwrapPem(Companion_getInstance_10().
|
|
390
|
+
tmp = unwrapPem(Companion_getInstance_10().xsk_1, key);
|
|
391
391
|
} else {
|
|
392
392
|
noWhenBranchMatchedException();
|
|
393
393
|
}
|
|
394
394
|
return tmp;
|
|
395
395
|
};
|
|
396
|
-
protoOf(EcPublicKeyProcessor).
|
|
397
|
-
return this.
|
|
396
|
+
protoOf(EcPublicKeyProcessor).osl = function (algorithm, format, key) {
|
|
397
|
+
return this.ism(algorithm, format instanceof Format_0 ? format : THROW_CCE(), key);
|
|
398
398
|
};
|
|
399
399
|
var EcPublicKeyProcessor_instance;
|
|
400
400
|
function EcPublicKeyProcessor_getInstance() {
|
|
@@ -406,7 +406,7 @@ function EcPrivateKeyProcessor() {
|
|
|
406
406
|
EcPrivateKeyProcessor_instance = this;
|
|
407
407
|
WebCryptoKeyProcessor.call(this);
|
|
408
408
|
}
|
|
409
|
-
protoOf(EcPrivateKeyProcessor).
|
|
409
|
+
protoOf(EcPrivateKeyProcessor).jsm = function (format) {
|
|
410
410
|
var tmp;
|
|
411
411
|
if (equals(format, JWK_getInstance_0())) {
|
|
412
412
|
tmp = 'jwk';
|
|
@@ -417,21 +417,21 @@ protoOf(EcPrivateKeyProcessor).ism = function (format) {
|
|
|
417
417
|
}
|
|
418
418
|
return tmp;
|
|
419
419
|
};
|
|
420
|
-
protoOf(EcPrivateKeyProcessor).
|
|
421
|
-
return this.
|
|
420
|
+
protoOf(EcPrivateKeyProcessor).msl = function (format) {
|
|
421
|
+
return this.jsm(format instanceof Format_1 ? format : THROW_CCE());
|
|
422
422
|
};
|
|
423
|
-
protoOf(EcPrivateKeyProcessor).
|
|
423
|
+
protoOf(EcPrivateKeyProcessor).ksm = function (algorithm, format, key) {
|
|
424
424
|
var tmp;
|
|
425
425
|
if (equals(format, JWK_getInstance_0())) {
|
|
426
426
|
tmp = key;
|
|
427
427
|
} else if (equals(format, RAW_getInstance())) {
|
|
428
428
|
var namedCurve = get_ecKeyAlgorithmNamedCurve(algorithm);
|
|
429
429
|
var tmp_0;
|
|
430
|
-
if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.
|
|
430
|
+
if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.wsg())) {
|
|
431
431
|
tmp_0 = get_secp256r1(Companion_instance_1);
|
|
432
|
-
} else if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.wsg())) {
|
|
433
|
-
tmp_0 = get_secp384r1(Companion_instance_1);
|
|
434
432
|
} else if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.xsg())) {
|
|
433
|
+
tmp_0 = get_secp384r1(Companion_instance_1);
|
|
434
|
+
} else if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.ysg())) {
|
|
435
435
|
tmp_0 = get_secp521r1(Companion_instance_1);
|
|
436
436
|
} else {
|
|
437
437
|
// Inline function 'kotlin.error' call
|
|
@@ -439,22 +439,22 @@ protoOf(EcPrivateKeyProcessor).jsm = function (algorithm, format, key) {
|
|
|
439
439
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
440
440
|
}
|
|
441
441
|
var curveId = tmp_0;
|
|
442
|
-
tmp = wrapPrivateKeyInfo(0, new EcKeyAlgorithmIdentifier(_EcParameters___init__impl__i4ww9z(curveId)), Default_getInstance().ku(Companion_instance_2.
|
|
442
|
+
tmp = wrapPrivateKeyInfo(0, new EcKeyAlgorithmIdentifier(_EcParameters___init__impl__i4ww9z(curveId)), Default_getInstance().ku(Companion_instance_2.f6d(), new EcPrivateKey(1, key)));
|
|
443
443
|
} else if (equals(format, Generic_getInstance())) {
|
|
444
444
|
tmp = key;
|
|
445
445
|
} else if (equals(format, Generic_getInstance_0())) {
|
|
446
|
-
tmp = unwrapPem(Companion_getInstance_10().
|
|
446
|
+
tmp = unwrapPem(Companion_getInstance_10().ysk_1, key);
|
|
447
447
|
} else if (equals(format, SEC1_getInstance())) {
|
|
448
448
|
tmp = convertEcPrivateKeyFromSec1ToPkcs8(key);
|
|
449
449
|
} else if (equals(format, SEC1_getInstance_0())) {
|
|
450
|
-
tmp = convertEcPrivateKeyFromSec1ToPkcs8(unwrapPem(Companion_getInstance_10().
|
|
450
|
+
tmp = convertEcPrivateKeyFromSec1ToPkcs8(unwrapPem(Companion_getInstance_10().bsl_1, key));
|
|
451
451
|
} else {
|
|
452
452
|
noWhenBranchMatchedException();
|
|
453
453
|
}
|
|
454
454
|
return tmp;
|
|
455
455
|
};
|
|
456
|
-
protoOf(EcPrivateKeyProcessor).
|
|
457
|
-
return this.
|
|
456
|
+
protoOf(EcPrivateKeyProcessor).osl = function (algorithm, format, key) {
|
|
457
|
+
return this.ksm(algorithm, format instanceof Format_1 ? format : THROW_CCE(), key);
|
|
458
458
|
};
|
|
459
459
|
var EcPrivateKeyProcessor_instance;
|
|
460
460
|
function EcPrivateKeyProcessor_getInstance() {
|
|
@@ -463,8 +463,8 @@ function EcPrivateKeyProcessor_getInstance() {
|
|
|
463
463
|
return EcPrivateKeyProcessor_instance;
|
|
464
464
|
}
|
|
465
465
|
function EcdhKeyPair(publicKey, privateKey) {
|
|
466
|
-
this.
|
|
467
|
-
this.
|
|
466
|
+
this.lsm_1 = publicKey;
|
|
467
|
+
this.msm_1 = privateKey;
|
|
468
468
|
}
|
|
469
469
|
function EcdhPublicKey(publicKey) {
|
|
470
470
|
EcPublicKey.call(this, publicKey);
|
|
@@ -514,8 +514,8 @@ function WebCryptoEcdh_getInstance() {
|
|
|
514
514
|
return WebCryptoEcdh_instance;
|
|
515
515
|
}
|
|
516
516
|
function EcdsaKeyPair(publicKey, privateKey) {
|
|
517
|
-
this.
|
|
518
|
-
this.
|
|
517
|
+
this.nsm_1 = publicKey;
|
|
518
|
+
this.osm_1 = privateKey;
|
|
519
519
|
}
|
|
520
520
|
function EcdsaPublicKey(publicKey) {
|
|
521
521
|
EcPublicKey.call(this, publicKey);
|
|
@@ -572,10 +572,10 @@ function WebCryptoHkdf_getInstance() {
|
|
|
572
572
|
}
|
|
573
573
|
function HmacKey(key) {
|
|
574
574
|
WebCryptoEncodableKey.call(this, key, HmacKeyProcessor_getInstance());
|
|
575
|
-
this.
|
|
575
|
+
this.rsm_1 = key;
|
|
576
576
|
}
|
|
577
|
-
protoOf(HmacKey).
|
|
578
|
-
return new WebCryptoSignatureGenerator(Algorithm('HMAC'), this.
|
|
577
|
+
protoOf(HmacKey).ssm = function () {
|
|
578
|
+
return new WebCryptoSignatureGenerator(Algorithm('HMAC'), this.rsm_1);
|
|
579
579
|
};
|
|
580
580
|
function WebCryptoHmac$HmacKey$_init_$ref_enwl2t() {
|
|
581
581
|
var l = function (p0) {
|
|
@@ -591,10 +591,10 @@ function WebCryptoHmac() {
|
|
|
591
591
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
592
592
|
// Inline function 'kotlin.js.asDynamic' call
|
|
593
593
|
var tmp_0 = ['sign', 'verify'];
|
|
594
|
-
tmp.
|
|
594
|
+
tmp.tsm_1 = new WebCryptoKeyWrapper(tmp_0, WebCryptoHmac$HmacKey$_init_$ref_enwl2t());
|
|
595
595
|
}
|
|
596
|
-
protoOf(WebCryptoHmac).
|
|
597
|
-
return new WebCryptoKeyDecoder(HmacKeyAlgorithm(hashAlgorithmName(digest), null), HmacKeyProcessor_getInstance(), this.
|
|
596
|
+
protoOf(WebCryptoHmac).usm = function (digest) {
|
|
597
|
+
return new WebCryptoKeyDecoder(HmacKeyAlgorithm(hashAlgorithmName(digest), null), HmacKeyProcessor_getInstance(), this.tsm_1);
|
|
598
598
|
};
|
|
599
599
|
var WebCryptoHmac_instance;
|
|
600
600
|
function WebCryptoHmac_getInstance() {
|
|
@@ -606,7 +606,7 @@ function HmacKeyProcessor() {
|
|
|
606
606
|
HmacKeyProcessor_instance = this;
|
|
607
607
|
WebCryptoKeyProcessor.call(this);
|
|
608
608
|
}
|
|
609
|
-
protoOf(HmacKeyProcessor).
|
|
609
|
+
protoOf(HmacKeyProcessor).vsm = function (format) {
|
|
610
610
|
var tmp;
|
|
611
611
|
switch (format.a1_1) {
|
|
612
612
|
case 0:
|
|
@@ -621,14 +621,14 @@ protoOf(HmacKeyProcessor).usm = function (format) {
|
|
|
621
621
|
}
|
|
622
622
|
return tmp;
|
|
623
623
|
};
|
|
624
|
-
protoOf(HmacKeyProcessor).
|
|
625
|
-
return this.
|
|
624
|
+
protoOf(HmacKeyProcessor).msl = function (format) {
|
|
625
|
+
return this.vsm(format instanceof Format_2 ? format : THROW_CCE());
|
|
626
626
|
};
|
|
627
|
-
protoOf(HmacKeyProcessor).
|
|
627
|
+
protoOf(HmacKeyProcessor).wsm = function (algorithm, format, key) {
|
|
628
628
|
return key;
|
|
629
629
|
};
|
|
630
|
-
protoOf(HmacKeyProcessor).
|
|
631
|
-
return this.
|
|
630
|
+
protoOf(HmacKeyProcessor).osl = function (algorithm, format, key) {
|
|
631
|
+
return this.wsm(algorithm, format instanceof Format_2 ? format : THROW_CCE(), key);
|
|
632
632
|
};
|
|
633
633
|
var HmacKeyProcessor_instance;
|
|
634
634
|
function HmacKeyProcessor_getInstance() {
|
|
@@ -644,35 +644,35 @@ function WebCryptoPbkdf2_getInstance() {
|
|
|
644
644
|
}
|
|
645
645
|
function RsaPublicKey(publicKey) {
|
|
646
646
|
WebCryptoEncodableKey.call(this, publicKey, RsaPublicKeyProcessor_getInstance());
|
|
647
|
-
this.
|
|
647
|
+
this.zsm_1 = publicKey;
|
|
648
648
|
}
|
|
649
649
|
function RsaPrivateKey(privateKey) {
|
|
650
650
|
WebCryptoEncodableKey.call(this, privateKey, RsaPrivateKeyProcessor_getInstance());
|
|
651
|
-
this.
|
|
651
|
+
this.csn_1 = privateKey;
|
|
652
652
|
}
|
|
653
653
|
function WebCryptoRsa$keyPairWrapper$lambda($keyPairWrapper, this$0) {
|
|
654
654
|
return function (it) {
|
|
655
|
-
return $keyPairWrapper(this$0.
|
|
655
|
+
return $keyPairWrapper(this$0.esn_1.bsm_1(it.publicKey), this$0.fsn_1.bsm_1(it.privateKey));
|
|
656
656
|
};
|
|
657
657
|
}
|
|
658
658
|
function WebCryptoRsa(algorithmName, publicKeyWrapper, privateKeyWrapper, keyPairWrapper) {
|
|
659
|
-
this.
|
|
660
|
-
this.
|
|
661
|
-
this.
|
|
659
|
+
this.dsn_1 = algorithmName;
|
|
660
|
+
this.esn_1 = publicKeyWrapper;
|
|
661
|
+
this.fsn_1 = privateKeyWrapper;
|
|
662
662
|
var tmp = this;
|
|
663
|
-
var tmp0 = this.
|
|
663
|
+
var tmp0 = this.esn_1.asm_1;
|
|
664
664
|
// Inline function 'kotlin.collections.plus' call
|
|
665
|
-
var elements = this.
|
|
665
|
+
var elements = this.fsn_1.asm_1;
|
|
666
666
|
// Inline function 'kotlin.js.asDynamic' call
|
|
667
|
-
tmp.
|
|
667
|
+
tmp.gsn_1 = tmp0.concat(elements);
|
|
668
668
|
var tmp_0 = this;
|
|
669
|
-
tmp_0.
|
|
669
|
+
tmp_0.hsn_1 = WebCryptoRsa$keyPairWrapper$lambda(keyPairWrapper, this);
|
|
670
670
|
}
|
|
671
671
|
function RsaPublicKeyProcessor() {
|
|
672
672
|
RsaPublicKeyProcessor_instance = this;
|
|
673
673
|
WebCryptoKeyProcessor.call(this);
|
|
674
674
|
}
|
|
675
|
-
protoOf(RsaPublicKeyProcessor).
|
|
675
|
+
protoOf(RsaPublicKeyProcessor).isn = function (format) {
|
|
676
676
|
var tmp;
|
|
677
677
|
if (equals(format, JWK_getInstance_1())) {
|
|
678
678
|
tmp = 'jwk';
|
|
@@ -683,28 +683,28 @@ protoOf(RsaPublicKeyProcessor).hsn = function (format) {
|
|
|
683
683
|
}
|
|
684
684
|
return tmp;
|
|
685
685
|
};
|
|
686
|
-
protoOf(RsaPublicKeyProcessor).
|
|
687
|
-
return this.
|
|
686
|
+
protoOf(RsaPublicKeyProcessor).msl = function (format) {
|
|
687
|
+
return this.isn(format instanceof Format_3 ? format : THROW_CCE());
|
|
688
688
|
};
|
|
689
|
-
protoOf(RsaPublicKeyProcessor).
|
|
689
|
+
protoOf(RsaPublicKeyProcessor).jsn = function (algorithm, format, key) {
|
|
690
690
|
var tmp;
|
|
691
691
|
if (equals(format, JWK_getInstance_1())) {
|
|
692
692
|
tmp = key;
|
|
693
693
|
} else if (equals(format, Generic_getInstance_1())) {
|
|
694
694
|
tmp = key;
|
|
695
695
|
} else if (equals(format, Generic_getInstance_2())) {
|
|
696
|
-
tmp = unwrapPem(Companion_getInstance_10().
|
|
696
|
+
tmp = unwrapPem(Companion_getInstance_10().xsk_1, key);
|
|
697
697
|
} else if (equals(format, PKCS1_getInstance())) {
|
|
698
698
|
tmp = wrapSubjectPublicKeyInfo(RsaKeyAlgorithmIdentifier_instance, key);
|
|
699
699
|
} else if (equals(format, PKCS1_getInstance_0())) {
|
|
700
|
-
tmp = wrapSubjectPublicKeyInfo(RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().
|
|
700
|
+
tmp = wrapSubjectPublicKeyInfo(RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().zsk_1, key));
|
|
701
701
|
} else {
|
|
702
702
|
noWhenBranchMatchedException();
|
|
703
703
|
}
|
|
704
704
|
return tmp;
|
|
705
705
|
};
|
|
706
|
-
protoOf(RsaPublicKeyProcessor).
|
|
707
|
-
return this.
|
|
706
|
+
protoOf(RsaPublicKeyProcessor).osl = function (algorithm, format, key) {
|
|
707
|
+
return this.jsn(algorithm, format instanceof Format_3 ? format : THROW_CCE(), key);
|
|
708
708
|
};
|
|
709
709
|
var RsaPublicKeyProcessor_instance;
|
|
710
710
|
function RsaPublicKeyProcessor_getInstance() {
|
|
@@ -716,7 +716,7 @@ function RsaPrivateKeyProcessor() {
|
|
|
716
716
|
RsaPrivateKeyProcessor_instance = this;
|
|
717
717
|
WebCryptoKeyProcessor.call(this);
|
|
718
718
|
}
|
|
719
|
-
protoOf(RsaPrivateKeyProcessor).
|
|
719
|
+
protoOf(RsaPrivateKeyProcessor).ksn = function (format) {
|
|
720
720
|
var tmp;
|
|
721
721
|
if (equals(format, JWK_getInstance_2())) {
|
|
722
722
|
tmp = 'jwk';
|
|
@@ -727,28 +727,28 @@ protoOf(RsaPrivateKeyProcessor).jsn = function (format) {
|
|
|
727
727
|
}
|
|
728
728
|
return tmp;
|
|
729
729
|
};
|
|
730
|
-
protoOf(RsaPrivateKeyProcessor).
|
|
731
|
-
return this.
|
|
730
|
+
protoOf(RsaPrivateKeyProcessor).msl = function (format) {
|
|
731
|
+
return this.ksn(format instanceof Format_4 ? format : THROW_CCE());
|
|
732
732
|
};
|
|
733
|
-
protoOf(RsaPrivateKeyProcessor).
|
|
733
|
+
protoOf(RsaPrivateKeyProcessor).lsn = function (algorithm, format, key) {
|
|
734
734
|
var tmp;
|
|
735
735
|
if (equals(format, JWK_getInstance_2())) {
|
|
736
736
|
tmp = key;
|
|
737
737
|
} else if (equals(format, Generic_getInstance_3())) {
|
|
738
738
|
tmp = key;
|
|
739
739
|
} else if (equals(format, Generic_getInstance_4())) {
|
|
740
|
-
tmp = unwrapPem(Companion_getInstance_10().
|
|
740
|
+
tmp = unwrapPem(Companion_getInstance_10().ysk_1, key);
|
|
741
741
|
} else if (equals(format, PKCS1_getInstance_1())) {
|
|
742
742
|
tmp = wrapPrivateKeyInfo(0, RsaKeyAlgorithmIdentifier_instance, key);
|
|
743
743
|
} else if (equals(format, PKCS1_getInstance_2())) {
|
|
744
|
-
tmp = wrapPrivateKeyInfo(0, RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().
|
|
744
|
+
tmp = wrapPrivateKeyInfo(0, RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().asl_1, key));
|
|
745
745
|
} else {
|
|
746
746
|
noWhenBranchMatchedException();
|
|
747
747
|
}
|
|
748
748
|
return tmp;
|
|
749
749
|
};
|
|
750
|
-
protoOf(RsaPrivateKeyProcessor).
|
|
751
|
-
return this.
|
|
750
|
+
protoOf(RsaPrivateKeyProcessor).osl = function (algorithm, format, key) {
|
|
751
|
+
return this.lsn(algorithm, format instanceof Format_4 ? format : THROW_CCE(), key);
|
|
752
752
|
};
|
|
753
753
|
var RsaPrivateKeyProcessor_instance;
|
|
754
754
|
function RsaPrivateKeyProcessor_getInstance() {
|
|
@@ -757,8 +757,8 @@ function RsaPrivateKeyProcessor_getInstance() {
|
|
|
757
757
|
return RsaPrivateKeyProcessor_instance;
|
|
758
758
|
}
|
|
759
759
|
function RsaOaepKeyPair(publicKey, privateKey) {
|
|
760
|
-
this.
|
|
761
|
-
this.
|
|
760
|
+
this.msn_1 = publicKey;
|
|
761
|
+
this.nsn_1 = privateKey;
|
|
762
762
|
}
|
|
763
763
|
function RsaOaepPublicKey(publicKey) {
|
|
764
764
|
RsaPublicKey.call(this, publicKey);
|
|
@@ -808,8 +808,8 @@ function WebCryptoRsaOaep_getInstance() {
|
|
|
808
808
|
return WebCryptoRsaOaep_instance;
|
|
809
809
|
}
|
|
810
810
|
function RsaPkcs1KeyPair(publicKey, privateKey) {
|
|
811
|
-
this.
|
|
812
|
-
this.
|
|
811
|
+
this.osn_1 = publicKey;
|
|
812
|
+
this.psn_1 = privateKey;
|
|
813
813
|
}
|
|
814
814
|
function RsaPkcs1PublicKey(publicKey) {
|
|
815
815
|
RsaPublicKey.call(this, publicKey);
|
|
@@ -859,8 +859,8 @@ function WebCryptoRsaPkcs1_getInstance() {
|
|
|
859
859
|
return WebCryptoRsaPkcs1_instance;
|
|
860
860
|
}
|
|
861
861
|
function RsaPssKeyPair(publicKey, privateKey) {
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
862
|
+
this.qsn_1 = publicKey;
|
|
863
|
+
this.rsn_1 = privateKey;
|
|
864
864
|
}
|
|
865
865
|
function RsaPssPublicKey(publicKey) {
|
|
866
866
|
RsaPublicKey.call(this, publicKey);
|
|
@@ -920,7 +920,7 @@ function hashAlgorithmName(_this__u8e3s4) {
|
|
|
920
920
|
} else if (equals(_this__u8e3s4, SHA512_getInstance())) {
|
|
921
921
|
tmp = 'SHA-512';
|
|
922
922
|
} else {
|
|
923
|
-
throw IllegalStateException_init_$Create$('Unsupported hash algorithm: ' + _this__u8e3s4.
|
|
923
|
+
throw IllegalStateException_init_$Create$('Unsupported hash algorithm: ' + _this__u8e3s4.hsg_1);
|
|
924
924
|
}
|
|
925
925
|
return tmp;
|
|
926
926
|
}
|
|
@@ -928,14 +928,14 @@ function nonBlocking() {
|
|
|
928
928
|
throw IllegalStateException_init_$Create$('Only non-blocking(suspend) calls are supported in WebCrypto');
|
|
929
929
|
}
|
|
930
930
|
function WebCryptoEncodableKey(key, keyProcessor) {
|
|
931
|
-
this.
|
|
932
|
-
this.
|
|
931
|
+
this.ssn_1 = key;
|
|
932
|
+
this.tsn_1 = keyProcessor;
|
|
933
933
|
}
|
|
934
934
|
function $decodeFromByteArrayCOROUTINE$(_this__u8e3s4, format, bytes, resultContinuation) {
|
|
935
935
|
CoroutineImpl.call(this, resultContinuation);
|
|
936
|
-
this.
|
|
937
|
-
this.
|
|
938
|
-
this.
|
|
936
|
+
this.cso_1 = _this__u8e3s4;
|
|
937
|
+
this.dso_1 = format;
|
|
938
|
+
this.eso_1 = bytes;
|
|
939
939
|
}
|
|
940
940
|
protoOf($decodeFromByteArrayCOROUTINE$).u9 = function () {
|
|
941
941
|
var suspendResult = this.o9_1;
|
|
@@ -945,9 +945,9 @@ protoOf($decodeFromByteArrayCOROUTINE$).u9 = function () {
|
|
|
945
945
|
switch (tmp) {
|
|
946
946
|
case 0:
|
|
947
947
|
this.n9_1 = 2;
|
|
948
|
-
this.
|
|
948
|
+
this.fso_1 = this.cso_1.jso_1.bsm_1;
|
|
949
949
|
this.m9_1 = 1;
|
|
950
|
-
suspendResult = WebCrypto_getInstance().
|
|
950
|
+
suspendResult = WebCrypto_getInstance().kso(this.cso_1.hso_1.msl(this.dso_1), this.cso_1.hso_1.osl(this.cso_1.gso_1, this.dso_1, this.eso_1), this.cso_1.gso_1, true, this.cso_1.jso_1.asm_1, this);
|
|
951
951
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
952
952
|
return suspendResult;
|
|
953
953
|
}
|
|
@@ -955,7 +955,7 @@ protoOf($decodeFromByteArrayCOROUTINE$).u9 = function () {
|
|
|
955
955
|
continue $sm;
|
|
956
956
|
case 1:
|
|
957
957
|
var ARGUMENT = suspendResult;
|
|
958
|
-
return this.
|
|
958
|
+
return this.fso_1(ARGUMENT);
|
|
959
959
|
case 2:
|
|
960
960
|
throw this.p9_1;
|
|
961
961
|
}
|
|
@@ -971,36 +971,36 @@ protoOf($decodeFromByteArrayCOROUTINE$).u9 = function () {
|
|
|
971
971
|
while (true);
|
|
972
972
|
};
|
|
973
973
|
function WebCryptoKeyDecoder(algorithm, keyProcessor, keyWrapper) {
|
|
974
|
-
this.
|
|
975
|
-
this.
|
|
976
|
-
this.
|
|
974
|
+
this.gso_1 = algorithm;
|
|
975
|
+
this.hso_1 = keyProcessor;
|
|
976
|
+
this.jso_1 = keyWrapper;
|
|
977
977
|
}
|
|
978
|
-
protoOf(WebCryptoKeyDecoder).
|
|
978
|
+
protoOf(WebCryptoKeyDecoder).zsg = function (format, bytes, $completion) {
|
|
979
979
|
var tmp = new $decodeFromByteArrayCOROUTINE$(this, format, bytes, $completion);
|
|
980
980
|
tmp.o9_1 = Unit_instance;
|
|
981
981
|
tmp.p9_1 = null;
|
|
982
982
|
return tmp.u9();
|
|
983
983
|
};
|
|
984
|
-
protoOf(WebCryptoKeyDecoder).
|
|
984
|
+
protoOf(WebCryptoKeyDecoder).ash = function (format, bytes) {
|
|
985
985
|
nonBlocking();
|
|
986
986
|
};
|
|
987
987
|
function WebCryptoKeyProcessor() {
|
|
988
988
|
}
|
|
989
989
|
function WebCryptoKeyWrapper(usages, wrap) {
|
|
990
|
-
this.
|
|
991
|
-
this.
|
|
990
|
+
this.asm_1 = usages;
|
|
991
|
+
this.bsm_1 = wrap;
|
|
992
992
|
}
|
|
993
993
|
function WebCryptoSignatureGenerator(algorithm, key) {
|
|
994
|
-
this.
|
|
995
|
-
this.
|
|
994
|
+
this.lso_1 = algorithm;
|
|
995
|
+
this.mso_1 = key;
|
|
996
996
|
}
|
|
997
|
-
protoOf(WebCryptoSignatureGenerator).
|
|
998
|
-
return WebCrypto_getInstance().
|
|
997
|
+
protoOf(WebCryptoSignatureGenerator).hsh = function (data, $completion) {
|
|
998
|
+
return WebCrypto_getInstance().nso(this.lso_1, this.mso_1, data, $completion);
|
|
999
999
|
};
|
|
1000
|
-
protoOf(WebCryptoSignatureGenerator).
|
|
1000
|
+
protoOf(WebCryptoSignatureGenerator).gsh = function () {
|
|
1001
1001
|
nonBlocking();
|
|
1002
1002
|
};
|
|
1003
|
-
protoOf(WebCryptoSignatureGenerator).
|
|
1003
|
+
protoOf(WebCryptoSignatureGenerator).ish = function (data) {
|
|
1004
1004
|
nonBlocking();
|
|
1005
1005
|
};
|
|
1006
1006
|
function get_initHook() {
|
|
@@ -1008,7 +1008,7 @@ function get_initHook() {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
var initHook;
|
|
1010
1010
|
function initHook$init$() {
|
|
1011
|
-
CryptographySystem_getInstance().
|
|
1011
|
+
CryptographySystem_getInstance().tsg(get_defaultProvider(), 100);
|
|
1012
1012
|
return Unit_instance;
|
|
1013
1013
|
}
|
|
1014
1014
|
function get_ecKeyAlgorithmNamedCurve(_this__u8e3s4) {
|
|
@@ -1047,9 +1047,9 @@ function getCrypto() {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
function $digestCOROUTINE$(_this__u8e3s4, algorithmName, data, resultContinuation) {
|
|
1049
1049
|
CoroutineImpl.call(this, resultContinuation);
|
|
1050
|
-
this.
|
|
1051
|
-
this.
|
|
1052
|
-
this.
|
|
1050
|
+
this.wso_1 = _this__u8e3s4;
|
|
1051
|
+
this.xso_1 = algorithmName;
|
|
1052
|
+
this.yso_1 = data;
|
|
1053
1053
|
}
|
|
1054
1054
|
protoOf($digestCOROUTINE$).u9 = function () {
|
|
1055
1055
|
var suspendResult = this.o9_1;
|
|
@@ -1060,7 +1060,7 @@ protoOf($digestCOROUTINE$).u9 = function () {
|
|
|
1060
1060
|
case 0:
|
|
1061
1061
|
this.n9_1 = 2;
|
|
1062
1062
|
this.m9_1 = 1;
|
|
1063
|
-
suspendResult = await_0(this.
|
|
1063
|
+
suspendResult = await_0(this.wso_1.ssl_1.digest(this.xso_1, this.yso_1), this);
|
|
1064
1064
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1065
1065
|
return suspendResult;
|
|
1066
1066
|
}
|
|
@@ -1085,10 +1085,10 @@ protoOf($digestCOROUTINE$).u9 = function () {
|
|
|
1085
1085
|
};
|
|
1086
1086
|
function $signCOROUTINE$(_this__u8e3s4, algorithm, key, data, resultContinuation) {
|
|
1087
1087
|
CoroutineImpl.call(this, resultContinuation);
|
|
1088
|
-
this.
|
|
1089
|
-
this.
|
|
1090
|
-
this.
|
|
1091
|
-
this.
|
|
1088
|
+
this.hsp_1 = _this__u8e3s4;
|
|
1089
|
+
this.isp_1 = algorithm;
|
|
1090
|
+
this.jsp_1 = key;
|
|
1091
|
+
this.ksp_1 = data;
|
|
1092
1092
|
}
|
|
1093
1093
|
protoOf($signCOROUTINE$).u9 = function () {
|
|
1094
1094
|
var suspendResult = this.o9_1;
|
|
@@ -1099,7 +1099,7 @@ protoOf($signCOROUTINE$).u9 = function () {
|
|
|
1099
1099
|
case 0:
|
|
1100
1100
|
this.n9_1 = 2;
|
|
1101
1101
|
this.m9_1 = 1;
|
|
1102
|
-
suspendResult = await_0(this.
|
|
1102
|
+
suspendResult = await_0(this.hsp_1.ssl_1.sign(this.isp_1, this.jsp_1, this.ksp_1), this);
|
|
1103
1103
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1104
1104
|
return suspendResult;
|
|
1105
1105
|
}
|
|
@@ -1124,23 +1124,23 @@ protoOf($signCOROUTINE$).u9 = function () {
|
|
|
1124
1124
|
};
|
|
1125
1125
|
function WebCrypto() {
|
|
1126
1126
|
WebCrypto_instance = this;
|
|
1127
|
-
this.
|
|
1127
|
+
this.ssl_1 = getSubtleCrypto();
|
|
1128
1128
|
}
|
|
1129
|
-
protoOf(WebCrypto).
|
|
1129
|
+
protoOf(WebCrypto).tsl = function (algorithmName, data, $completion) {
|
|
1130
1130
|
var tmp = new $digestCOROUTINE$(this, algorithmName, data, $completion);
|
|
1131
1131
|
tmp.o9_1 = Unit_instance;
|
|
1132
1132
|
tmp.p9_1 = null;
|
|
1133
1133
|
return tmp.u9();
|
|
1134
1134
|
};
|
|
1135
|
-
protoOf(WebCrypto).
|
|
1135
|
+
protoOf(WebCrypto).nso = function (algorithm, key, data, $completion) {
|
|
1136
1136
|
var tmp = new $signCOROUTINE$(this, algorithm, key, data, $completion);
|
|
1137
1137
|
tmp.o9_1 = Unit_instance;
|
|
1138
1138
|
tmp.p9_1 = null;
|
|
1139
1139
|
return tmp.u9();
|
|
1140
1140
|
};
|
|
1141
|
-
protoOf(WebCrypto).
|
|
1141
|
+
protoOf(WebCrypto).kso = function (format, keyData, algorithm, extractable, keyUsages, $completion) {
|
|
1142
1142
|
var key = format === 'jwk' ? JSON.parse(decodeToString(keyData)) : keyData;
|
|
1143
|
-
return await_0(this.
|
|
1143
|
+
return await_0(this.ssl_1.importKey(format, key, algorithm, extractable, keyUsages), $completion);
|
|
1144
1144
|
};
|
|
1145
1145
|
var WebCrypto_instance;
|
|
1146
1146
|
function WebCrypto_getInstance() {
|