@solibo/solibo-sdk 1.0.35 → 1.0.37
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 +286 -0
- package/KmLogging-logging.mjs.map +1 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +7247 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
- package/KotlinBigInteger-bignum.mjs +5987 -0
- package/KotlinBigInteger-bignum.mjs.map +1 -0
- package/MultiplatformSettings-multiplatform-settings-no-arg.mjs +15 -0
- package/{MultiplatformSettings-multiplatform-settings-no-arg.js.map → MultiplatformSettings-multiplatform-settings-no-arg.mjs.map} +1 -1
- package/MultiplatformSettings-multiplatform-settings.mjs +70 -0
- package/MultiplatformSettings-multiplatform-settings.mjs.map +1 -0
- package/Stately-stately-concurrency.mjs +25 -0
- package/{Stately-stately-concurrency.js.map → Stately-stately-concurrency.mjs.map} +1 -1
- package/Stately-stately-strict.mjs +8 -0
- package/{Stately-stately-strict.js.map → Stately-stately-strict.mjs.map} +1 -1
- package/cryptography-kotlin-cryptography-bigint.mjs +241 -0
- package/cryptography-kotlin-cryptography-bigint.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-core.mjs +1095 -0
- package/cryptography-kotlin-cryptography-core.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-provider-base.mjs +62 -0
- package/cryptography-kotlin-cryptography-provider-base.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-provider-optimal.mjs +4 -0
- package/{cryptography-kotlin-cryptography-provider-optimal.js.map → cryptography-kotlin-cryptography-provider-optimal.mjs.map} +1 -1
- package/cryptography-kotlin-cryptography-provider-webcrypto.mjs +1195 -0
- package/cryptography-kotlin-cryptography-provider-webcrypto.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-random.mjs +127 -0
- package/cryptography-kotlin-cryptography-random.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs +701 -0
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-serialization-asn1.mjs +1413 -0
- package/cryptography-kotlin-cryptography-serialization-asn1.mjs.map +1 -0
- package/cryptography-kotlin-cryptography-serialization-pem.mjs +153 -0
- package/cryptography-kotlin-cryptography-serialization-pem.mjs.map +1 -0
- package/index.d.ts +2 -579
- package/index.js +2 -578
- package/kotlin-kotlin-stdlib.mjs +19205 -0
- package/kotlin-kotlin-stdlib.mjs.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
- package/{kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map → kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map} +1 -1
- package/kotlinx-atomicfu.mjs +250 -0
- package/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlinx-browser.mjs +8 -0
- package/{kotlinx-browser.js.map → kotlinx-browser.mjs.map} +1 -1
- package/kotlinx-coroutines-core.mjs +9836 -0
- package/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
- package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
- package/kotlinx-io-kotlinx-io-core.mjs +2020 -0
- package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +6337 -0
- package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
- package/{kotlinx-serialization-kotlinx-serialization-json-io.js.map → kotlinx-serialization-kotlinx-serialization-json-io.mjs.map} +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +5104 -0
- package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
- package/ktor-ktor-client-auth.mjs +1491 -0
- package/ktor-ktor-client-auth.mjs.map +1 -0
- package/ktor-ktor-client-content-negotiation.mjs +750 -0
- package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
- package/ktor-ktor-client-core.mjs +14114 -0
- package/ktor-ktor-client-core.mjs.map +1 -0
- package/ktor-ktor-client-logging.mjs +3263 -0
- package/ktor-ktor-client-logging.mjs.map +1 -0
- package/ktor-ktor-client-mock.mjs +4 -0
- package/{ktor-ktor-client-mock.js.map → ktor-ktor-client-mock.mjs.map} +1 -1
- package/ktor-ktor-events.mjs +81 -0
- package/ktor-ktor-events.mjs.map +1 -0
- package/ktor-ktor-http-cio.mjs +2254 -0
- package/ktor-ktor-http-cio.mjs.map +1 -0
- package/ktor-ktor-http.mjs +5181 -0
- package/ktor-ktor-http.mjs.map +1 -0
- package/ktor-ktor-io.mjs +3608 -0
- package/ktor-ktor-io.mjs.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
- package/{ktor-ktor-serialization-kotlinx-json.js.map → ktor-ktor-serialization-kotlinx-json.mjs.map} +1 -1
- package/ktor-ktor-serialization-kotlinx.mjs +843 -0
- package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
- package/ktor-ktor-serialization.mjs +364 -0
- package/ktor-ktor-serialization.mjs.map +1 -0
- package/ktor-ktor-sse.mjs +4 -0
- package/ktor-ktor-sse.mjs.map +1 -0
- package/ktor-ktor-utils.mjs +3627 -0
- package/ktor-ktor-utils.mjs.map +1 -0
- package/ktor-ktor-websocket-serialization.mjs +4 -0
- package/ktor-ktor-websocket-serialization.mjs.map +1 -0
- package/ktor-ktor-websockets.mjs +2535 -0
- package/ktor-ktor-websockets.mjs.map +1 -0
- package/package.json +1 -1
- package/solibo-sdk-sdk-home-api.mjs +193155 -0
- package/solibo-sdk-sdk-home-api.mjs.map +1 -0
- package/solibo-sdk-sdk.d.mts +13403 -0
- package/solibo-sdk-sdk.mjs +7814 -0
- package/solibo-sdk-sdk.mjs.map +1 -0
- package/KmLogging-logging.js +0 -301
- package/KmLogging-logging.js.map +0 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -7261
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
- package/KotlinBigInteger-bignum.js +0 -5999
- package/KotlinBigInteger-bignum.js.map +0 -1
- package/MultiplatformSettings-multiplatform-settings-no-arg.js +0 -29
- package/MultiplatformSettings-multiplatform-settings.js +0 -82
- package/MultiplatformSettings-multiplatform-settings.js.map +0 -1
- package/Stately-stately-concurrency.js +0 -37
- package/Stately-stately-strict.js +0 -19
- package/cryptography-kotlin-cryptography-bigint.js +0 -254
- package/cryptography-kotlin-cryptography-bigint.js.map +0 -1
- package/cryptography-kotlin-cryptography-core.js +0 -1110
- package/cryptography-kotlin-cryptography-core.js.map +0 -1
- package/cryptography-kotlin-cryptography-provider-base.js +0 -77
- package/cryptography-kotlin-cryptography-provider-base.js.map +0 -1
- package/cryptography-kotlin-cryptography-provider-optimal.js +0 -15
- package/cryptography-kotlin-cryptography-provider-webcrypto.js +0 -1222
- package/cryptography-kotlin-cryptography-provider-webcrypto.js.map +0 -1
- package/cryptography-kotlin-cryptography-random.js +0 -139
- package/cryptography-kotlin-cryptography-random.js.map +0 -1
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.js +0 -715
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.js.map +0 -1
- package/cryptography-kotlin-cryptography-serialization-asn1.js +0 -1427
- package/cryptography-kotlin-cryptography-serialization-asn1.js.map +0 -1
- package/cryptography-kotlin-cryptography-serialization-pem.js +0 -165
- package/cryptography-kotlin-cryptography-serialization-pem.js.map +0 -1
- package/kotlin-kotlin-stdlib.js +0 -19124
- package/kotlin-kotlin-stdlib.js.map +0 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +0 -15
- package/kotlinx-atomicfu.js +0 -262
- package/kotlinx-atomicfu.js.map +0 -1
- package/kotlinx-browser.js +0 -19
- package/kotlinx-coroutines-core.js +0 -9849
- package/kotlinx-coroutines-core.js.map +0 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +0 -214
- package/kotlinx-io-kotlinx-io-bytestring.js.map +0 -1
- package/kotlinx-io-kotlinx-io-core.js +0 -2035
- package/kotlinx-io-kotlinx-io-core.js.map +0 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +0 -6349
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +0 -1
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +0 -15
- package/kotlinx-serialization-kotlinx-serialization-json.js +0 -5117
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +0 -1
- package/ktor-ktor-client-auth.js +0 -1510
- package/ktor-ktor-client-auth.js.map +0 -1
- package/ktor-ktor-client-content-negotiation.js +0 -767
- package/ktor-ktor-client-content-negotiation.js.map +0 -1
- package/ktor-ktor-client-core.js +0 -14143
- package/ktor-ktor-client-core.js.map +0 -1
- package/ktor-ktor-client-logging.js +0 -3286
- package/ktor-ktor-client-logging.js.map +0 -1
- package/ktor-ktor-client-mock.js +0 -15
- package/ktor-ktor-events.js +0 -94
- package/ktor-ktor-events.js.map +0 -1
- package/ktor-ktor-http-cio.js +0 -2271
- package/ktor-ktor-http-cio.js.map +0 -1
- package/ktor-ktor-http.js +0 -5196
- package/ktor-ktor-http.js.map +0 -1
- package/ktor-ktor-io.js +0 -3628
- package/ktor-ktor-io.js.map +0 -1
- package/ktor-ktor-serialization-kotlinx-json.js +0 -67
- package/ktor-ktor-serialization-kotlinx.js +0 -865
- package/ktor-ktor-serialization-kotlinx.js.map +0 -1
- package/ktor-ktor-serialization.js +0 -379
- package/ktor-ktor-serialization.js.map +0 -1
- package/ktor-ktor-sse.js +0 -15
- package/ktor-ktor-sse.js.map +0 -1
- package/ktor-ktor-utils.js +0 -3643
- package/ktor-ktor-utils.js.map +0 -1
- package/ktor-ktor-websocket-serialization.js +0 -15
- package/ktor-ktor-websocket-serialization.js.map +0 -1
- package/ktor-ktor-websockets.js +0 -2552
- package/ktor-ktor-websockets.js.map +0 -1
- package/solibo-sdk-sdk-home-api.js +0 -194775
- package/solibo-sdk-sdk-home-api.js.map +0 -1
- package/solibo-sdk-sdk.d.ts +0 -14248
- package/solibo-sdk-sdk.js +0 -7897
- package/solibo-sdk-sdk.js.map +0 -1
|
@@ -1,1222 +0,0 @@
|
|
|
1
|
-
(function (factory) {
|
|
2
|
-
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', './cryptography-kotlin-cryptography-core.js', './kotlin-kotlin-stdlib.js', './cryptography-kotlin-cryptography-serialization-pem.js', './cryptography-kotlin-cryptography-provider-base.js', './cryptography-kotlin-cryptography-serialization-asn1.js', './cryptography-kotlin-cryptography-serialization-asn1-modules.js'], factory);
|
|
4
|
-
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('./cryptography-kotlin-cryptography-core.js'), require('./kotlin-kotlin-stdlib.js'), require('./cryptography-kotlin-cryptography-serialization-pem.js'), require('./cryptography-kotlin-cryptography-provider-base.js'), require('./cryptography-kotlin-cryptography-serialization-asn1.js'), require('./cryptography-kotlin-cryptography-serialization-asn1-modules.js'));
|
|
6
|
-
else {
|
|
7
|
-
if (typeof globalThis['cryptography-kotlin-cryptography-core'] === 'undefined') {
|
|
8
|
-
throw new Error("Error loading module 'cryptography-kotlin-cryptography-provider-webcrypto'. Its dependency 'cryptography-kotlin-cryptography-core' was not found. Please, check whether 'cryptography-kotlin-cryptography-core' is loaded prior to 'cryptography-kotlin-cryptography-provider-webcrypto'.");
|
|
9
|
-
}
|
|
10
|
-
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
11
|
-
throw new Error("Error loading module 'cryptography-kotlin-cryptography-provider-webcrypto'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'cryptography-kotlin-cryptography-provider-webcrypto'.");
|
|
12
|
-
}
|
|
13
|
-
if (typeof globalThis['cryptography-kotlin-cryptography-serialization-pem'] === 'undefined') {
|
|
14
|
-
throw new Error("Error loading module 'cryptography-kotlin-cryptography-provider-webcrypto'. Its dependency 'cryptography-kotlin-cryptography-serialization-pem' was not found. Please, check whether 'cryptography-kotlin-cryptography-serialization-pem' is loaded prior to 'cryptography-kotlin-cryptography-provider-webcrypto'.");
|
|
15
|
-
}
|
|
16
|
-
if (typeof globalThis['cryptography-kotlin-cryptography-provider-base'] === 'undefined') {
|
|
17
|
-
throw new Error("Error loading module 'cryptography-kotlin-cryptography-provider-webcrypto'. Its dependency 'cryptography-kotlin-cryptography-provider-base' was not found. Please, check whether 'cryptography-kotlin-cryptography-provider-base' is loaded prior to 'cryptography-kotlin-cryptography-provider-webcrypto'.");
|
|
18
|
-
}
|
|
19
|
-
if (typeof globalThis['cryptography-kotlin-cryptography-serialization-asn1'] === 'undefined') {
|
|
20
|
-
throw new Error("Error loading module 'cryptography-kotlin-cryptography-provider-webcrypto'. Its dependency 'cryptography-kotlin-cryptography-serialization-asn1' was not found. Please, check whether 'cryptography-kotlin-cryptography-serialization-asn1' is loaded prior to 'cryptography-kotlin-cryptography-provider-webcrypto'.");
|
|
21
|
-
}
|
|
22
|
-
if (typeof globalThis['cryptography-kotlin-cryptography-serialization-asn1-modules'] === 'undefined') {
|
|
23
|
-
throw new Error("Error loading module 'cryptography-kotlin-cryptography-provider-webcrypto'. Its dependency 'cryptography-kotlin-cryptography-serialization-asn1-modules' was not found. Please, check whether 'cryptography-kotlin-cryptography-serialization-asn1-modules' is loaded prior to 'cryptography-kotlin-cryptography-provider-webcrypto'.");
|
|
24
|
-
}
|
|
25
|
-
globalThis['cryptography-kotlin-cryptography-provider-webcrypto'] = factory(typeof globalThis['cryptography-kotlin-cryptography-provider-webcrypto'] === 'undefined' ? {} : globalThis['cryptography-kotlin-cryptography-provider-webcrypto'], globalThis['cryptography-kotlin-cryptography-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['cryptography-kotlin-cryptography-serialization-pem'], globalThis['cryptography-kotlin-cryptography-provider-base'], globalThis['cryptography-kotlin-cryptography-serialization-asn1'], globalThis['cryptography-kotlin-cryptography-serialization-asn1-modules']);
|
|
26
|
-
}
|
|
27
|
-
}(function (_, kotlin_dev_whyoleg_cryptography_cryptography_core, kotlin_kotlin, kotlin_dev_whyoleg_cryptography_cryptography_serialization_pem, kotlin_dev_whyoleg_cryptography_cryptography_provider_base, kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1, kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules) {
|
|
28
|
-
'use strict';
|
|
29
|
-
//region block: imports
|
|
30
|
-
var CryptographyProvider = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.k;
|
|
31
|
-
var Companion_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.e1;
|
|
32
|
-
var equals = kotlin_kotlin.$_$.ac;
|
|
33
|
-
var Companion_getInstance_0 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.g1;
|
|
34
|
-
var Companion_getInstance_1 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.c1;
|
|
35
|
-
var Companion_getInstance_2 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.d1;
|
|
36
|
-
var Companion_getInstance_3 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.i1;
|
|
37
|
-
var Companion_getInstance_4 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.j1;
|
|
38
|
-
var Companion_getInstance_5 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.h1;
|
|
39
|
-
var Companion_getInstance_6 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.p;
|
|
40
|
-
var Companion_getInstance_7 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.o;
|
|
41
|
-
var Companion_getInstance_8 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.n;
|
|
42
|
-
var Companion_getInstance_9 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.f1;
|
|
43
|
-
var SHA512_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.x1;
|
|
44
|
-
var SHA384_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.w1;
|
|
45
|
-
var SHA256_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.v1;
|
|
46
|
-
var SHA1_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.u1;
|
|
47
|
-
var THROW_CCE = kotlin_kotlin.$_$.hi;
|
|
48
|
-
var CryptographyAlgorithm = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.j;
|
|
49
|
-
var isInterface = kotlin_kotlin.$_$.yc;
|
|
50
|
-
var protoOf = kotlin_kotlin.$_$.jd;
|
|
51
|
-
var initMetadataForObject = kotlin_kotlin.$_$.pc;
|
|
52
|
-
var VOID = kotlin_kotlin.$_$.c;
|
|
53
|
-
var lazy = kotlin_kotlin.$_$.gj;
|
|
54
|
-
var initMetadataForClass = kotlin_kotlin.$_$.jc;
|
|
55
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.hj;
|
|
56
|
-
var Format = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.a;
|
|
57
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.kc;
|
|
58
|
-
var Hasher = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.h;
|
|
59
|
-
var DER_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.x;
|
|
60
|
-
var PEM_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.z;
|
|
61
|
-
var Uncompressed_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.b1;
|
|
62
|
-
var Compressed_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.a1;
|
|
63
|
-
var JWK_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.y;
|
|
64
|
-
var Format_0 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.c;
|
|
65
|
-
var Companion_getInstance_10 = kotlin_dev_whyoleg_cryptography_cryptography_serialization_pem.$_$.b;
|
|
66
|
-
var unwrapPem = kotlin_dev_whyoleg_cryptography_cryptography_provider_base.$_$.b;
|
|
67
|
-
var RAW_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.w;
|
|
68
|
-
var Generic_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.r;
|
|
69
|
-
var Generic_getInstance_0 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.u;
|
|
70
|
-
var SEC1_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.s;
|
|
71
|
-
var SEC1_getInstance_0 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.v;
|
|
72
|
-
var JWK_getInstance_0 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.t;
|
|
73
|
-
var Format_1 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.b;
|
|
74
|
-
var convertEcPrivateKeyFromSec1ToPkcs8 = kotlin_dev_whyoleg_cryptography_cryptography_provider_base.$_$.a;
|
|
75
|
-
var toString = kotlin_kotlin.$_$.md;
|
|
76
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.u1;
|
|
77
|
-
var Companion_instance = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.k;
|
|
78
|
-
var get_secp521r1 = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.h;
|
|
79
|
-
var Companion_instance_0 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.q;
|
|
80
|
-
var _Curve___get_name__impl__klrusc = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.m;
|
|
81
|
-
var get_secp384r1 = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.g;
|
|
82
|
-
var get_secp256r1 = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.f;
|
|
83
|
-
var _EcParameters___init__impl__i4ww9z = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.i;
|
|
84
|
-
var EcKeyAlgorithmIdentifier = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.a;
|
|
85
|
-
var Default_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.i;
|
|
86
|
-
var Companion_instance_1 = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.j;
|
|
87
|
-
var EcPrivateKey = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.c;
|
|
88
|
-
var wrapPrivateKeyInfo = kotlin_dev_whyoleg_cryptography_cryptography_provider_base.$_$.c;
|
|
89
|
-
var Format_2 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.d;
|
|
90
|
-
var Generic_getInstance_1 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.p1;
|
|
91
|
-
var Generic_getInstance_2 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.s1;
|
|
92
|
-
var PKCS1_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.q1;
|
|
93
|
-
var PKCS1_getInstance_0 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.t1;
|
|
94
|
-
var JWK_getInstance_1 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.r1;
|
|
95
|
-
var Format_3 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.f;
|
|
96
|
-
var RsaKeyAlgorithmIdentifier_instance = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1_modules.$_$.l;
|
|
97
|
-
var wrapSubjectPublicKeyInfo = kotlin_dev_whyoleg_cryptography_cryptography_provider_base.$_$.d;
|
|
98
|
-
var Generic_getInstance_3 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.k1;
|
|
99
|
-
var Generic_getInstance_4 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.n1;
|
|
100
|
-
var PKCS1_getInstance_1 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.l1;
|
|
101
|
-
var PKCS1_getInstance_2 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.o1;
|
|
102
|
-
var JWK_getInstance_2 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.m1;
|
|
103
|
-
var Format_4 = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.e;
|
|
104
|
-
var CoroutineImpl = kotlin_kotlin.$_$.qa;
|
|
105
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.z9;
|
|
106
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.lc;
|
|
107
|
-
var Unit_instance = kotlin_kotlin.$_$.p5;
|
|
108
|
-
var KeyDecoder = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.g;
|
|
109
|
-
var SignatureGenerator = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.i;
|
|
110
|
-
var CryptographySystem_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_core.$_$.z1;
|
|
111
|
-
var defineProp = kotlin_kotlin.$_$.zb;
|
|
112
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.q1;
|
|
113
|
-
var decodeToString = kotlin_kotlin.$_$.se;
|
|
114
|
-
var intercepted = kotlin_kotlin.$_$.ca;
|
|
115
|
-
var SafeContinuation_init_$Create$ = kotlin_kotlin.$_$.b1;
|
|
116
|
-
var Companion_instance_2 = kotlin_kotlin.$_$.k5;
|
|
117
|
-
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.s2;
|
|
118
|
-
var createFailure = kotlin_kotlin.$_$.zi;
|
|
119
|
-
//endregion
|
|
120
|
-
//region block: pre-declaration
|
|
121
|
-
initMetadataForObject(WebCryptoCryptographyProvider, 'WebCryptoCryptographyProvider', VOID, CryptographyProvider);
|
|
122
|
-
initMetadataForClass(WebCryptoEncodableKey, 'WebCryptoEncodableKey', VOID, VOID, VOID, [1]);
|
|
123
|
-
initMetadataForClass(AesKey, 'AesKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
124
|
-
initMetadataForClass(WebCryptoAes, 'WebCryptoAes', VOID, VOID, [CryptographyAlgorithm]);
|
|
125
|
-
initMetadataForClass(WebCryptoKeyProcessor, 'WebCryptoKeyProcessor');
|
|
126
|
-
initMetadataForObject(AesKeyProcessor, 'AesKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
127
|
-
initMetadataForClass(AesCbcKey, 'AesCbcKey', VOID, AesKey, VOID, [1]);
|
|
128
|
-
initMetadataForObject(WebCryptoAesCbc, 'WebCryptoAesCbc', VOID, WebCryptoAes, [WebCryptoAes, CryptographyAlgorithm]);
|
|
129
|
-
initMetadataForClass(AesCtrKey, 'AesCtrKey', VOID, AesKey, VOID, [1]);
|
|
130
|
-
initMetadataForObject(WebCryptoAesCtr, 'WebCryptoAesCtr', VOID, WebCryptoAes, [WebCryptoAes, CryptographyAlgorithm]);
|
|
131
|
-
initMetadataForClass(AesGcmKey, 'AesGcmKey', VOID, AesKey, VOID, [1]);
|
|
132
|
-
initMetadataForObject(WebCryptoAesGcm, 'WebCryptoAesGcm', VOID, WebCryptoAes, [WebCryptoAes, CryptographyAlgorithm]);
|
|
133
|
-
initMetadataForCompanion(Companion);
|
|
134
|
-
initMetadataForClass(WebCryptoDigest, 'WebCryptoDigest', VOID, VOID, [CryptographyAlgorithm, Hasher], [1]);
|
|
135
|
-
initMetadataForClass(EcPublicKey, 'EcPublicKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
136
|
-
initMetadataForClass(EcPrivateKey_0, 'EcPrivateKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
137
|
-
initMetadataForClass(WebCryptoEc, 'WebCryptoEc', VOID, VOID, [CryptographyAlgorithm]);
|
|
138
|
-
initMetadataForObject(EcPublicKeyProcessor, 'EcPublicKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
139
|
-
initMetadataForObject(EcPrivateKeyProcessor, 'EcPrivateKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
140
|
-
initMetadataForClass(EcdhKeyPair, 'EcdhKeyPair');
|
|
141
|
-
initMetadataForClass(EcdhPublicKey, 'EcdhPublicKey', VOID, EcPublicKey, VOID, [1]);
|
|
142
|
-
initMetadataForClass(EcdhPrivateKey, 'EcdhPrivateKey', VOID, EcPrivateKey_0, VOID, [1]);
|
|
143
|
-
initMetadataForObject(WebCryptoEcdh, 'WebCryptoEcdh', VOID, WebCryptoEc, [WebCryptoEc, CryptographyAlgorithm]);
|
|
144
|
-
initMetadataForClass(EcdsaKeyPair, 'EcdsaKeyPair');
|
|
145
|
-
initMetadataForClass(EcdsaPublicKey, 'EcdsaPublicKey', VOID, EcPublicKey, VOID, [1]);
|
|
146
|
-
initMetadataForClass(EcdsaPrivateKey, 'EcdsaPrivateKey', VOID, EcPrivateKey_0, VOID, [1]);
|
|
147
|
-
initMetadataForObject(WebCryptoEcdsa, 'WebCryptoEcdsa', VOID, WebCryptoEc, [WebCryptoEc, CryptographyAlgorithm]);
|
|
148
|
-
initMetadataForObject(WebCryptoHkdf, 'WebCryptoHkdf', VOID, VOID, [CryptographyAlgorithm]);
|
|
149
|
-
initMetadataForClass(HmacKey, 'HmacKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
150
|
-
initMetadataForObject(WebCryptoHmac, 'WebCryptoHmac', VOID, VOID, [CryptographyAlgorithm]);
|
|
151
|
-
initMetadataForObject(HmacKeyProcessor, 'HmacKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
152
|
-
initMetadataForObject(WebCryptoPbkdf2, 'WebCryptoPbkdf2', VOID, VOID, [CryptographyAlgorithm]);
|
|
153
|
-
initMetadataForClass(RsaPublicKey, 'RsaPublicKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
154
|
-
initMetadataForClass(RsaPrivateKey, 'RsaPrivateKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
155
|
-
initMetadataForClass(WebCryptoRsa, 'WebCryptoRsa', VOID, VOID, [CryptographyAlgorithm]);
|
|
156
|
-
initMetadataForObject(RsaPublicKeyProcessor, 'RsaPublicKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
157
|
-
initMetadataForObject(RsaPrivateKeyProcessor, 'RsaPrivateKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
158
|
-
initMetadataForClass(RsaOaepKeyPair, 'RsaOaepKeyPair');
|
|
159
|
-
initMetadataForClass(RsaOaepPublicKey, 'RsaOaepPublicKey', VOID, RsaPublicKey, VOID, [1]);
|
|
160
|
-
initMetadataForClass(RsaOaepPrivateKey, 'RsaOaepPrivateKey', VOID, RsaPrivateKey, VOID, [1]);
|
|
161
|
-
initMetadataForObject(WebCryptoRsaOaep, 'WebCryptoRsaOaep', VOID, WebCryptoRsa, [WebCryptoRsa, CryptographyAlgorithm]);
|
|
162
|
-
initMetadataForClass(RsaPkcs1KeyPair, 'RsaPkcs1KeyPair');
|
|
163
|
-
initMetadataForClass(RsaPkcs1PublicKey, 'RsaPkcs1PublicKey', VOID, RsaPublicKey, VOID, [1]);
|
|
164
|
-
initMetadataForClass(RsaPkcs1PrivateKey, 'RsaPkcs1PrivateKey', VOID, RsaPrivateKey, VOID, [1]);
|
|
165
|
-
initMetadataForObject(WebCryptoRsaPkcs1, 'WebCryptoRsaPkcs1', VOID, WebCryptoRsa, [WebCryptoRsa, CryptographyAlgorithm]);
|
|
166
|
-
initMetadataForClass(RsaPssKeyPair, 'RsaPssKeyPair');
|
|
167
|
-
initMetadataForClass(RsaPssPublicKey, 'RsaPssPublicKey', VOID, RsaPublicKey, VOID, [1]);
|
|
168
|
-
initMetadataForClass(RsaPssPrivateKey, 'RsaPssPrivateKey', VOID, RsaPrivateKey, VOID, [1]);
|
|
169
|
-
initMetadataForObject(WebCryptoRsaPss, 'WebCryptoRsaPss', VOID, WebCryptoRsa, [WebCryptoRsa, CryptographyAlgorithm]);
|
|
170
|
-
initMetadataForCoroutine($decodeFromByteArrayCOROUTINE$, CoroutineImpl);
|
|
171
|
-
initMetadataForClass(WebCryptoKeyDecoder, 'WebCryptoKeyDecoder', VOID, VOID, [KeyDecoder], [2]);
|
|
172
|
-
initMetadataForClass(WebCryptoKeyWrapper, 'WebCryptoKeyWrapper');
|
|
173
|
-
initMetadataForClass(WebCryptoSignatureGenerator, 'WebCryptoSignatureGenerator', VOID, VOID, [SignatureGenerator], [1]);
|
|
174
|
-
initMetadataForCoroutine($digestCOROUTINE$, CoroutineImpl);
|
|
175
|
-
initMetadataForCoroutine($signCOROUTINE$, CoroutineImpl);
|
|
176
|
-
initMetadataForObject(WebCrypto, 'WebCrypto', VOID, VOID, VOID, [2, 3, 4, 5]);
|
|
177
|
-
//endregion
|
|
178
|
-
function get_defaultProvider() {
|
|
179
|
-
_init_properties_WebCryptoCryptographyProvider_kt__i22tls();
|
|
180
|
-
return defaultProvider;
|
|
181
|
-
}
|
|
182
|
-
var defaultProvider;
|
|
183
|
-
var WebCrypto$delegate;
|
|
184
|
-
function WebCryptoCryptographyProvider() {
|
|
185
|
-
WebCryptoCryptographyProvider_instance = this;
|
|
186
|
-
CryptographyProvider.call(this);
|
|
187
|
-
}
|
|
188
|
-
protoOf(WebCryptoCryptographyProvider).lny = function (identifier) {
|
|
189
|
-
var tmp = equals(identifier, SHA1_getInstance()) ? Companion_getInstance_11().co3_1 : equals(identifier, SHA256_getInstance()) ? Companion_getInstance_11().do3_1 : equals(identifier, SHA384_getInstance()) ? Companion_getInstance_11().eo3_1 : equals(identifier, SHA512_getInstance()) ? Companion_getInstance_11().fo3_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;
|
|
190
|
-
return (tmp == null ? true : isInterface(tmp, CryptographyAlgorithm)) ? tmp : THROW_CCE();
|
|
191
|
-
};
|
|
192
|
-
var WebCryptoCryptographyProvider_instance;
|
|
193
|
-
function WebCryptoCryptographyProvider_getInstance() {
|
|
194
|
-
if (WebCryptoCryptographyProvider_instance == null)
|
|
195
|
-
new WebCryptoCryptographyProvider();
|
|
196
|
-
return WebCryptoCryptographyProvider_instance;
|
|
197
|
-
}
|
|
198
|
-
function defaultProvider$lambda() {
|
|
199
|
-
_init_properties_WebCryptoCryptographyProvider_kt__i22tls();
|
|
200
|
-
return WebCryptoCryptographyProvider_getInstance();
|
|
201
|
-
}
|
|
202
|
-
var properties_initialized_WebCryptoCryptographyProvider_kt_n89q9u;
|
|
203
|
-
function _init_properties_WebCryptoCryptographyProvider_kt__i22tls() {
|
|
204
|
-
if (!properties_initialized_WebCryptoCryptographyProvider_kt_n89q9u) {
|
|
205
|
-
properties_initialized_WebCryptoCryptographyProvider_kt_n89q9u = true;
|
|
206
|
-
defaultProvider = lazy(defaultProvider$lambda);
|
|
207
|
-
WebCrypto$delegate = get_defaultProvider();
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
function AesKey(key) {
|
|
211
|
-
WebCryptoEncodableKey.call(this, key, AesKeyProcessor_getInstance());
|
|
212
|
-
this.io3_1 = key;
|
|
213
|
-
}
|
|
214
|
-
function WebCryptoAes(algorithmName, keyWrapper) {
|
|
215
|
-
this.jo3_1 = algorithmName;
|
|
216
|
-
this.ko3_1 = keyWrapper;
|
|
217
|
-
}
|
|
218
|
-
function AesKeyProcessor() {
|
|
219
|
-
AesKeyProcessor_instance = this;
|
|
220
|
-
WebCryptoKeyProcessor.call(this);
|
|
221
|
-
}
|
|
222
|
-
protoOf(AesKeyProcessor).lo3 = function (format) {
|
|
223
|
-
var tmp;
|
|
224
|
-
switch (format.a1_1) {
|
|
225
|
-
case 0:
|
|
226
|
-
tmp = 'raw';
|
|
227
|
-
break;
|
|
228
|
-
case 1:
|
|
229
|
-
tmp = 'jwk';
|
|
230
|
-
break;
|
|
231
|
-
default:
|
|
232
|
-
noWhenBranchMatchedException();
|
|
233
|
-
break;
|
|
234
|
-
}
|
|
235
|
-
return tmp;
|
|
236
|
-
};
|
|
237
|
-
protoOf(AesKeyProcessor).mo3 = function (format) {
|
|
238
|
-
return this.lo3(format instanceof Format ? format : THROW_CCE());
|
|
239
|
-
};
|
|
240
|
-
protoOf(AesKeyProcessor).no3 = function (algorithm, format, key) {
|
|
241
|
-
return key;
|
|
242
|
-
};
|
|
243
|
-
protoOf(AesKeyProcessor).oo3 = function (algorithm, format, key) {
|
|
244
|
-
return this.no3(algorithm, format instanceof Format ? format : THROW_CCE(), key);
|
|
245
|
-
};
|
|
246
|
-
var AesKeyProcessor_instance;
|
|
247
|
-
function AesKeyProcessor_getInstance() {
|
|
248
|
-
if (AesKeyProcessor_instance == null)
|
|
249
|
-
new AesKeyProcessor();
|
|
250
|
-
return AesKeyProcessor_instance;
|
|
251
|
-
}
|
|
252
|
-
function AesCbcKey(key) {
|
|
253
|
-
AesKey.call(this, key);
|
|
254
|
-
}
|
|
255
|
-
function WebCryptoAesCbc$AesCbcKey$_init_$ref_lop2vf() {
|
|
256
|
-
var l = function (p0) {
|
|
257
|
-
return new AesCbcKey(p0);
|
|
258
|
-
};
|
|
259
|
-
l.callableName = '<init>';
|
|
260
|
-
return l;
|
|
261
|
-
}
|
|
262
|
-
function WebCryptoAesCbc() {
|
|
263
|
-
WebCryptoAesCbc_instance = this;
|
|
264
|
-
// Inline function 'kotlin.arrayOf' call
|
|
265
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
266
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
267
|
-
var tmp = ['encrypt', 'decrypt'];
|
|
268
|
-
WebCryptoAes.call(this, 'AES-CBC', new WebCryptoKeyWrapper(tmp, WebCryptoAesCbc$AesCbcKey$_init_$ref_lop2vf()));
|
|
269
|
-
}
|
|
270
|
-
var WebCryptoAesCbc_instance;
|
|
271
|
-
function WebCryptoAesCbc_getInstance() {
|
|
272
|
-
if (WebCryptoAesCbc_instance == null)
|
|
273
|
-
new WebCryptoAesCbc();
|
|
274
|
-
return WebCryptoAesCbc_instance;
|
|
275
|
-
}
|
|
276
|
-
function AesCtrKey(key) {
|
|
277
|
-
AesKey.call(this, key);
|
|
278
|
-
}
|
|
279
|
-
function WebCryptoAesCtr$AesCtrKey$_init_$ref_5qzjvv() {
|
|
280
|
-
var l = function (p0) {
|
|
281
|
-
return new AesCtrKey(p0);
|
|
282
|
-
};
|
|
283
|
-
l.callableName = '<init>';
|
|
284
|
-
return l;
|
|
285
|
-
}
|
|
286
|
-
function WebCryptoAesCtr() {
|
|
287
|
-
WebCryptoAesCtr_instance = this;
|
|
288
|
-
// Inline function 'kotlin.arrayOf' call
|
|
289
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
290
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
291
|
-
var tmp = ['encrypt', 'decrypt'];
|
|
292
|
-
WebCryptoAes.call(this, 'AES-CTR', new WebCryptoKeyWrapper(tmp, WebCryptoAesCtr$AesCtrKey$_init_$ref_5qzjvv()));
|
|
293
|
-
}
|
|
294
|
-
var WebCryptoAesCtr_instance;
|
|
295
|
-
function WebCryptoAesCtr_getInstance() {
|
|
296
|
-
if (WebCryptoAesCtr_instance == null)
|
|
297
|
-
new WebCryptoAesCtr();
|
|
298
|
-
return WebCryptoAesCtr_instance;
|
|
299
|
-
}
|
|
300
|
-
function AesGcmKey(key) {
|
|
301
|
-
AesKey.call(this, key);
|
|
302
|
-
}
|
|
303
|
-
function WebCryptoAesGcm$AesGcmKey$_init_$ref_c6pr3f() {
|
|
304
|
-
var l = function (p0) {
|
|
305
|
-
return new AesGcmKey(p0);
|
|
306
|
-
};
|
|
307
|
-
l.callableName = '<init>';
|
|
308
|
-
return l;
|
|
309
|
-
}
|
|
310
|
-
function WebCryptoAesGcm() {
|
|
311
|
-
WebCryptoAesGcm_instance = this;
|
|
312
|
-
// Inline function 'kotlin.arrayOf' call
|
|
313
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
314
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
315
|
-
var tmp = ['encrypt', 'decrypt'];
|
|
316
|
-
WebCryptoAes.call(this, 'AES-GCM', new WebCryptoKeyWrapper(tmp, WebCryptoAesGcm$AesGcmKey$_init_$ref_c6pr3f()));
|
|
317
|
-
}
|
|
318
|
-
var WebCryptoAesGcm_instance;
|
|
319
|
-
function WebCryptoAesGcm_getInstance() {
|
|
320
|
-
if (WebCryptoAesGcm_instance == null)
|
|
321
|
-
new WebCryptoAesGcm();
|
|
322
|
-
return WebCryptoAesGcm_instance;
|
|
323
|
-
}
|
|
324
|
-
function Companion() {
|
|
325
|
-
Companion_instance_3 = this;
|
|
326
|
-
this.co3_1 = new WebCryptoDigest('SHA-1', SHA1_getInstance());
|
|
327
|
-
this.do3_1 = new WebCryptoDigest('SHA-256', SHA256_getInstance());
|
|
328
|
-
this.eo3_1 = new WebCryptoDigest('SHA-384', SHA384_getInstance());
|
|
329
|
-
this.fo3_1 = new WebCryptoDigest('SHA-512', SHA512_getInstance());
|
|
330
|
-
}
|
|
331
|
-
var Companion_instance_3;
|
|
332
|
-
function Companion_getInstance_11() {
|
|
333
|
-
if (Companion_instance_3 == null)
|
|
334
|
-
new Companion();
|
|
335
|
-
return Companion_instance_3;
|
|
336
|
-
}
|
|
337
|
-
function WebCryptoDigest(algorithm, id) {
|
|
338
|
-
Companion_getInstance_11();
|
|
339
|
-
this.po3_1 = algorithm;
|
|
340
|
-
this.qo3_1 = id;
|
|
341
|
-
}
|
|
342
|
-
protoOf(WebCryptoDigest).ro3 = function () {
|
|
343
|
-
return this;
|
|
344
|
-
};
|
|
345
|
-
protoOf(WebCryptoDigest).cnz = function (data, $completion) {
|
|
346
|
-
return WebCrypto_getInstance().to3(this.po3_1, data, $completion);
|
|
347
|
-
};
|
|
348
|
-
protoOf(WebCryptoDigest).bnz = function () {
|
|
349
|
-
nonBlocking();
|
|
350
|
-
};
|
|
351
|
-
protoOf(WebCryptoDigest).dnz = function (data) {
|
|
352
|
-
nonBlocking();
|
|
353
|
-
};
|
|
354
|
-
function EcPublicKey(publicKey) {
|
|
355
|
-
WebCryptoEncodableKey.call(this, publicKey, EcPublicKeyProcessor_getInstance());
|
|
356
|
-
this.wo3_1 = publicKey;
|
|
357
|
-
}
|
|
358
|
-
function EcPrivateKey_0(privateKey) {
|
|
359
|
-
WebCryptoEncodableKey.call(this, privateKey, EcPrivateKeyProcessor_getInstance());
|
|
360
|
-
this.zo3_1 = privateKey;
|
|
361
|
-
}
|
|
362
|
-
function WebCryptoEc$keyPairWrapper$lambda($keyPairWrapper, this$0) {
|
|
363
|
-
return function (it) {
|
|
364
|
-
return $keyPairWrapper(this$0.do4_1.bo4_1(it.publicKey), this$0.eo4_1.bo4_1(it.privateKey));
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
function WebCryptoEc(algorithmName, publicKeyWrapper, privateKeyWrapper, keyPairWrapper) {
|
|
368
|
-
this.co4_1 = algorithmName;
|
|
369
|
-
this.do4_1 = publicKeyWrapper;
|
|
370
|
-
this.eo4_1 = privateKeyWrapper;
|
|
371
|
-
var tmp = this;
|
|
372
|
-
var tmp0 = this.do4_1.ao4_1;
|
|
373
|
-
// Inline function 'kotlin.collections.plus' call
|
|
374
|
-
var elements = this.eo4_1.ao4_1;
|
|
375
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
376
|
-
tmp.fo4_1 = tmp0.concat(elements);
|
|
377
|
-
var tmp_0 = this;
|
|
378
|
-
tmp_0.go4_1 = WebCryptoEc$keyPairWrapper$lambda(keyPairWrapper, this);
|
|
379
|
-
}
|
|
380
|
-
function EcPublicKeyProcessor() {
|
|
381
|
-
EcPublicKeyProcessor_instance = this;
|
|
382
|
-
WebCryptoKeyProcessor.call(this);
|
|
383
|
-
}
|
|
384
|
-
protoOf(EcPublicKeyProcessor).ho4 = function (format) {
|
|
385
|
-
var tmp;
|
|
386
|
-
if (equals(format, JWK_getInstance())) {
|
|
387
|
-
tmp = 'jwk';
|
|
388
|
-
} else if (equals(format, Uncompressed_getInstance()) || equals(format, Compressed_getInstance())) {
|
|
389
|
-
tmp = 'raw';
|
|
390
|
-
} else if (equals(format, DER_getInstance()) || equals(format, PEM_getInstance())) {
|
|
391
|
-
tmp = 'spki';
|
|
392
|
-
} else {
|
|
393
|
-
noWhenBranchMatchedException();
|
|
394
|
-
}
|
|
395
|
-
return tmp;
|
|
396
|
-
};
|
|
397
|
-
protoOf(EcPublicKeyProcessor).mo3 = function (format) {
|
|
398
|
-
return this.ho4(format instanceof Format_0 ? format : THROW_CCE());
|
|
399
|
-
};
|
|
400
|
-
protoOf(EcPublicKeyProcessor).io4 = function (algorithm, format, key) {
|
|
401
|
-
var tmp;
|
|
402
|
-
if (equals(format, JWK_getInstance())) {
|
|
403
|
-
tmp = key;
|
|
404
|
-
} else if (equals(format, Uncompressed_getInstance()) || equals(format, Compressed_getInstance())) {
|
|
405
|
-
tmp = key;
|
|
406
|
-
} else if (equals(format, DER_getInstance())) {
|
|
407
|
-
tmp = key;
|
|
408
|
-
} else if (equals(format, PEM_getInstance())) {
|
|
409
|
-
tmp = unwrapPem(Companion_getInstance_10().xo2_1, key);
|
|
410
|
-
} else {
|
|
411
|
-
noWhenBranchMatchedException();
|
|
412
|
-
}
|
|
413
|
-
return tmp;
|
|
414
|
-
};
|
|
415
|
-
protoOf(EcPublicKeyProcessor).oo3 = function (algorithm, format, key) {
|
|
416
|
-
return this.io4(algorithm, format instanceof Format_0 ? format : THROW_CCE(), key);
|
|
417
|
-
};
|
|
418
|
-
var EcPublicKeyProcessor_instance;
|
|
419
|
-
function EcPublicKeyProcessor_getInstance() {
|
|
420
|
-
if (EcPublicKeyProcessor_instance == null)
|
|
421
|
-
new EcPublicKeyProcessor();
|
|
422
|
-
return EcPublicKeyProcessor_instance;
|
|
423
|
-
}
|
|
424
|
-
function EcPrivateKeyProcessor() {
|
|
425
|
-
EcPrivateKeyProcessor_instance = this;
|
|
426
|
-
WebCryptoKeyProcessor.call(this);
|
|
427
|
-
}
|
|
428
|
-
protoOf(EcPrivateKeyProcessor).jo4 = function (format) {
|
|
429
|
-
var tmp;
|
|
430
|
-
if (equals(format, JWK_getInstance_0())) {
|
|
431
|
-
tmp = 'jwk';
|
|
432
|
-
} else if (equals(format, RAW_getInstance()) || equals(format, Generic_getInstance()) || (equals(format, Generic_getInstance_0()) || (equals(format, SEC1_getInstance()) || equals(format, SEC1_getInstance_0())))) {
|
|
433
|
-
tmp = 'pkcs8';
|
|
434
|
-
} else {
|
|
435
|
-
noWhenBranchMatchedException();
|
|
436
|
-
}
|
|
437
|
-
return tmp;
|
|
438
|
-
};
|
|
439
|
-
protoOf(EcPrivateKeyProcessor).mo3 = function (format) {
|
|
440
|
-
return this.jo4(format instanceof Format_1 ? format : THROW_CCE());
|
|
441
|
-
};
|
|
442
|
-
protoOf(EcPrivateKeyProcessor).ko4 = function (algorithm, format, key) {
|
|
443
|
-
var tmp;
|
|
444
|
-
if (equals(format, JWK_getInstance_0())) {
|
|
445
|
-
tmp = key;
|
|
446
|
-
} else if (equals(format, RAW_getInstance())) {
|
|
447
|
-
var namedCurve = get_ecKeyAlgorithmNamedCurve(algorithm);
|
|
448
|
-
var tmp_0;
|
|
449
|
-
if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance_0.wny())) {
|
|
450
|
-
tmp_0 = get_secp256r1(Companion_instance);
|
|
451
|
-
} else if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance_0.xny())) {
|
|
452
|
-
tmp_0 = get_secp384r1(Companion_instance);
|
|
453
|
-
} else if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance_0.yny())) {
|
|
454
|
-
tmp_0 = get_secp521r1(Companion_instance);
|
|
455
|
-
} else {
|
|
456
|
-
var message = 'Unknown curve: ' + namedCurve;
|
|
457
|
-
throw IllegalStateException_init_$Create$(toString(message));
|
|
458
|
-
}
|
|
459
|
-
var curveId = tmp_0;
|
|
460
|
-
tmp = wrapPrivateKeyInfo(0, new EcKeyAlgorithmIdentifier(_EcParameters___init__impl__i4ww9z(curveId)), Default_getInstance().yt(Companion_instance_1.g63(), new EcPrivateKey(1, key)));
|
|
461
|
-
} else if (equals(format, Generic_getInstance())) {
|
|
462
|
-
tmp = key;
|
|
463
|
-
} else if (equals(format, Generic_getInstance_0())) {
|
|
464
|
-
tmp = unwrapPem(Companion_getInstance_10().yo2_1, key);
|
|
465
|
-
} else if (equals(format, SEC1_getInstance())) {
|
|
466
|
-
tmp = convertEcPrivateKeyFromSec1ToPkcs8(key);
|
|
467
|
-
} else if (equals(format, SEC1_getInstance_0())) {
|
|
468
|
-
tmp = convertEcPrivateKeyFromSec1ToPkcs8(unwrapPem(Companion_getInstance_10().bo3_1, key));
|
|
469
|
-
} else {
|
|
470
|
-
noWhenBranchMatchedException();
|
|
471
|
-
}
|
|
472
|
-
return tmp;
|
|
473
|
-
};
|
|
474
|
-
protoOf(EcPrivateKeyProcessor).oo3 = function (algorithm, format, key) {
|
|
475
|
-
return this.ko4(algorithm, format instanceof Format_1 ? format : THROW_CCE(), key);
|
|
476
|
-
};
|
|
477
|
-
var EcPrivateKeyProcessor_instance;
|
|
478
|
-
function EcPrivateKeyProcessor_getInstance() {
|
|
479
|
-
if (EcPrivateKeyProcessor_instance == null)
|
|
480
|
-
new EcPrivateKeyProcessor();
|
|
481
|
-
return EcPrivateKeyProcessor_instance;
|
|
482
|
-
}
|
|
483
|
-
function EcdhKeyPair(publicKey, privateKey) {
|
|
484
|
-
this.lo4_1 = publicKey;
|
|
485
|
-
this.mo4_1 = privateKey;
|
|
486
|
-
}
|
|
487
|
-
function EcdhPublicKey(publicKey) {
|
|
488
|
-
EcPublicKey.call(this, publicKey);
|
|
489
|
-
}
|
|
490
|
-
function EcdhPrivateKey(privateKey) {
|
|
491
|
-
EcPrivateKey_0.call(this, privateKey);
|
|
492
|
-
}
|
|
493
|
-
function WebCryptoEcdh$EcdhPublicKey$_init_$ref_x8kjxe() {
|
|
494
|
-
var l = function (p0) {
|
|
495
|
-
return new EcdhPublicKey(p0);
|
|
496
|
-
};
|
|
497
|
-
l.callableName = '<init>';
|
|
498
|
-
return l;
|
|
499
|
-
}
|
|
500
|
-
function WebCryptoEcdh$EcdhPrivateKey$_init_$ref_1xgfie() {
|
|
501
|
-
var l = function (p0) {
|
|
502
|
-
return new EcdhPrivateKey(p0);
|
|
503
|
-
};
|
|
504
|
-
l.callableName = '<init>';
|
|
505
|
-
return l;
|
|
506
|
-
}
|
|
507
|
-
function WebCryptoEcdh$EcdhKeyPair$_init_$ref_fqllqz() {
|
|
508
|
-
var l = function (p0, p1) {
|
|
509
|
-
return new EcdhKeyPair(p0, p1);
|
|
510
|
-
};
|
|
511
|
-
l.callableName = '<init>';
|
|
512
|
-
return l;
|
|
513
|
-
}
|
|
514
|
-
function WebCryptoEcdh() {
|
|
515
|
-
WebCryptoEcdh_instance = this;
|
|
516
|
-
// Inline function 'kotlin.arrayOf' call
|
|
517
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
518
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
519
|
-
var tmp = [];
|
|
520
|
-
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoEcdh$EcdhPublicKey$_init_$ref_x8kjxe());
|
|
521
|
-
// Inline function 'kotlin.arrayOf' call
|
|
522
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
523
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
524
|
-
var tmp_1 = ['deriveBits'];
|
|
525
|
-
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoEcdh$EcdhPrivateKey$_init_$ref_1xgfie());
|
|
526
|
-
WebCryptoEc.call(this, 'ECDH', tmp_0, tmp_2, WebCryptoEcdh$EcdhKeyPair$_init_$ref_fqllqz());
|
|
527
|
-
}
|
|
528
|
-
var WebCryptoEcdh_instance;
|
|
529
|
-
function WebCryptoEcdh_getInstance() {
|
|
530
|
-
if (WebCryptoEcdh_instance == null)
|
|
531
|
-
new WebCryptoEcdh();
|
|
532
|
-
return WebCryptoEcdh_instance;
|
|
533
|
-
}
|
|
534
|
-
function EcdsaKeyPair(publicKey, privateKey) {
|
|
535
|
-
this.no4_1 = publicKey;
|
|
536
|
-
this.oo4_1 = privateKey;
|
|
537
|
-
}
|
|
538
|
-
function EcdsaPublicKey(publicKey) {
|
|
539
|
-
EcPublicKey.call(this, publicKey);
|
|
540
|
-
}
|
|
541
|
-
function EcdsaPrivateKey(privateKey) {
|
|
542
|
-
EcPrivateKey_0.call(this, privateKey);
|
|
543
|
-
}
|
|
544
|
-
function WebCryptoEcdsa$EcdsaPublicKey$_init_$ref_5egfgi() {
|
|
545
|
-
var l = function (p0) {
|
|
546
|
-
return new EcdsaPublicKey(p0);
|
|
547
|
-
};
|
|
548
|
-
l.callableName = '<init>';
|
|
549
|
-
return l;
|
|
550
|
-
}
|
|
551
|
-
function WebCryptoEcdsa$EcdsaPrivateKey$_init_$ref_8mqrbu() {
|
|
552
|
-
var l = function (p0) {
|
|
553
|
-
return new EcdsaPrivateKey(p0);
|
|
554
|
-
};
|
|
555
|
-
l.callableName = '<init>';
|
|
556
|
-
return l;
|
|
557
|
-
}
|
|
558
|
-
function WebCryptoEcdsa$EcdsaKeyPair$_init_$ref_l5vyez() {
|
|
559
|
-
var l = function (p0, p1) {
|
|
560
|
-
return new EcdsaKeyPair(p0, p1);
|
|
561
|
-
};
|
|
562
|
-
l.callableName = '<init>';
|
|
563
|
-
return l;
|
|
564
|
-
}
|
|
565
|
-
function WebCryptoEcdsa() {
|
|
566
|
-
WebCryptoEcdsa_instance = this;
|
|
567
|
-
// Inline function 'kotlin.arrayOf' call
|
|
568
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
569
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
570
|
-
var tmp = ['verify'];
|
|
571
|
-
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoEcdsa$EcdsaPublicKey$_init_$ref_5egfgi());
|
|
572
|
-
// Inline function 'kotlin.arrayOf' call
|
|
573
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
574
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
575
|
-
var tmp_1 = ['sign'];
|
|
576
|
-
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoEcdsa$EcdsaPrivateKey$_init_$ref_8mqrbu());
|
|
577
|
-
WebCryptoEc.call(this, 'ECDSA', tmp_0, tmp_2, WebCryptoEcdsa$EcdsaKeyPair$_init_$ref_l5vyez());
|
|
578
|
-
}
|
|
579
|
-
var WebCryptoEcdsa_instance;
|
|
580
|
-
function WebCryptoEcdsa_getInstance() {
|
|
581
|
-
if (WebCryptoEcdsa_instance == null)
|
|
582
|
-
new WebCryptoEcdsa();
|
|
583
|
-
return WebCryptoEcdsa_instance;
|
|
584
|
-
}
|
|
585
|
-
function WebCryptoHkdf() {
|
|
586
|
-
}
|
|
587
|
-
var WebCryptoHkdf_instance;
|
|
588
|
-
function WebCryptoHkdf_getInstance() {
|
|
589
|
-
return WebCryptoHkdf_instance;
|
|
590
|
-
}
|
|
591
|
-
function HmacKey(key) {
|
|
592
|
-
WebCryptoEncodableKey.call(this, key, HmacKeyProcessor_getInstance());
|
|
593
|
-
this.ro4_1 = key;
|
|
594
|
-
}
|
|
595
|
-
protoOf(HmacKey).so4 = function () {
|
|
596
|
-
return new WebCryptoSignatureGenerator(Algorithm('HMAC'), this.ro4_1);
|
|
597
|
-
};
|
|
598
|
-
function WebCryptoHmac$HmacKey$_init_$ref_enwl2t() {
|
|
599
|
-
var l = function (p0) {
|
|
600
|
-
return new HmacKey(p0);
|
|
601
|
-
};
|
|
602
|
-
l.callableName = '<init>';
|
|
603
|
-
return l;
|
|
604
|
-
}
|
|
605
|
-
function WebCryptoHmac() {
|
|
606
|
-
WebCryptoHmac_instance = this;
|
|
607
|
-
var tmp = this;
|
|
608
|
-
// Inline function 'kotlin.arrayOf' call
|
|
609
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
610
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
611
|
-
var tmp_0 = ['sign', 'verify'];
|
|
612
|
-
tmp.to4_1 = new WebCryptoKeyWrapper(tmp_0, WebCryptoHmac$HmacKey$_init_$ref_enwl2t());
|
|
613
|
-
}
|
|
614
|
-
protoOf(WebCryptoHmac).uo4 = function (digest) {
|
|
615
|
-
return new WebCryptoKeyDecoder(HmacKeyAlgorithm(hashAlgorithmName(digest), null), HmacKeyProcessor_getInstance(), this.to4_1);
|
|
616
|
-
};
|
|
617
|
-
var WebCryptoHmac_instance;
|
|
618
|
-
function WebCryptoHmac_getInstance() {
|
|
619
|
-
if (WebCryptoHmac_instance == null)
|
|
620
|
-
new WebCryptoHmac();
|
|
621
|
-
return WebCryptoHmac_instance;
|
|
622
|
-
}
|
|
623
|
-
function HmacKeyProcessor() {
|
|
624
|
-
HmacKeyProcessor_instance = this;
|
|
625
|
-
WebCryptoKeyProcessor.call(this);
|
|
626
|
-
}
|
|
627
|
-
protoOf(HmacKeyProcessor).vo4 = function (format) {
|
|
628
|
-
var tmp;
|
|
629
|
-
switch (format.a1_1) {
|
|
630
|
-
case 0:
|
|
631
|
-
tmp = 'raw';
|
|
632
|
-
break;
|
|
633
|
-
case 1:
|
|
634
|
-
tmp = 'jwk';
|
|
635
|
-
break;
|
|
636
|
-
default:
|
|
637
|
-
noWhenBranchMatchedException();
|
|
638
|
-
break;
|
|
639
|
-
}
|
|
640
|
-
return tmp;
|
|
641
|
-
};
|
|
642
|
-
protoOf(HmacKeyProcessor).mo3 = function (format) {
|
|
643
|
-
return this.vo4(format instanceof Format_2 ? format : THROW_CCE());
|
|
644
|
-
};
|
|
645
|
-
protoOf(HmacKeyProcessor).wo4 = function (algorithm, format, key) {
|
|
646
|
-
return key;
|
|
647
|
-
};
|
|
648
|
-
protoOf(HmacKeyProcessor).oo3 = function (algorithm, format, key) {
|
|
649
|
-
return this.wo4(algorithm, format instanceof Format_2 ? format : THROW_CCE(), key);
|
|
650
|
-
};
|
|
651
|
-
var HmacKeyProcessor_instance;
|
|
652
|
-
function HmacKeyProcessor_getInstance() {
|
|
653
|
-
if (HmacKeyProcessor_instance == null)
|
|
654
|
-
new HmacKeyProcessor();
|
|
655
|
-
return HmacKeyProcessor_instance;
|
|
656
|
-
}
|
|
657
|
-
function WebCryptoPbkdf2() {
|
|
658
|
-
}
|
|
659
|
-
var WebCryptoPbkdf2_instance;
|
|
660
|
-
function WebCryptoPbkdf2_getInstance() {
|
|
661
|
-
return WebCryptoPbkdf2_instance;
|
|
662
|
-
}
|
|
663
|
-
function RsaPublicKey(publicKey) {
|
|
664
|
-
WebCryptoEncodableKey.call(this, publicKey, RsaPublicKeyProcessor_getInstance());
|
|
665
|
-
this.zo4_1 = publicKey;
|
|
666
|
-
}
|
|
667
|
-
function RsaPrivateKey(privateKey) {
|
|
668
|
-
WebCryptoEncodableKey.call(this, privateKey, RsaPrivateKeyProcessor_getInstance());
|
|
669
|
-
this.co5_1 = privateKey;
|
|
670
|
-
}
|
|
671
|
-
function WebCryptoRsa$keyPairWrapper$lambda($keyPairWrapper, this$0) {
|
|
672
|
-
return function (it) {
|
|
673
|
-
return $keyPairWrapper(this$0.eo5_1.bo4_1(it.publicKey), this$0.fo5_1.bo4_1(it.privateKey));
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
function WebCryptoRsa(algorithmName, publicKeyWrapper, privateKeyWrapper, keyPairWrapper) {
|
|
677
|
-
this.do5_1 = algorithmName;
|
|
678
|
-
this.eo5_1 = publicKeyWrapper;
|
|
679
|
-
this.fo5_1 = privateKeyWrapper;
|
|
680
|
-
var tmp = this;
|
|
681
|
-
var tmp0 = this.eo5_1.ao4_1;
|
|
682
|
-
// Inline function 'kotlin.collections.plus' call
|
|
683
|
-
var elements = this.fo5_1.ao4_1;
|
|
684
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
685
|
-
tmp.go5_1 = tmp0.concat(elements);
|
|
686
|
-
var tmp_0 = this;
|
|
687
|
-
tmp_0.ho5_1 = WebCryptoRsa$keyPairWrapper$lambda(keyPairWrapper, this);
|
|
688
|
-
}
|
|
689
|
-
function RsaPublicKeyProcessor() {
|
|
690
|
-
RsaPublicKeyProcessor_instance = this;
|
|
691
|
-
WebCryptoKeyProcessor.call(this);
|
|
692
|
-
}
|
|
693
|
-
protoOf(RsaPublicKeyProcessor).io5 = function (format) {
|
|
694
|
-
var tmp;
|
|
695
|
-
if (equals(format, JWK_getInstance_1())) {
|
|
696
|
-
tmp = 'jwk';
|
|
697
|
-
} else if (equals(format, Generic_getInstance_1()) || equals(format, Generic_getInstance_2()) || (equals(format, PKCS1_getInstance()) || equals(format, PKCS1_getInstance_0()))) {
|
|
698
|
-
tmp = 'spki';
|
|
699
|
-
} else {
|
|
700
|
-
noWhenBranchMatchedException();
|
|
701
|
-
}
|
|
702
|
-
return tmp;
|
|
703
|
-
};
|
|
704
|
-
protoOf(RsaPublicKeyProcessor).mo3 = function (format) {
|
|
705
|
-
return this.io5(format instanceof Format_3 ? format : THROW_CCE());
|
|
706
|
-
};
|
|
707
|
-
protoOf(RsaPublicKeyProcessor).jo5 = function (algorithm, format, key) {
|
|
708
|
-
var tmp;
|
|
709
|
-
if (equals(format, JWK_getInstance_1())) {
|
|
710
|
-
tmp = key;
|
|
711
|
-
} else if (equals(format, Generic_getInstance_1())) {
|
|
712
|
-
tmp = key;
|
|
713
|
-
} else if (equals(format, Generic_getInstance_2())) {
|
|
714
|
-
tmp = unwrapPem(Companion_getInstance_10().xo2_1, key);
|
|
715
|
-
} else if (equals(format, PKCS1_getInstance())) {
|
|
716
|
-
tmp = wrapSubjectPublicKeyInfo(RsaKeyAlgorithmIdentifier_instance, key);
|
|
717
|
-
} else if (equals(format, PKCS1_getInstance_0())) {
|
|
718
|
-
tmp = wrapSubjectPublicKeyInfo(RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().zo2_1, key));
|
|
719
|
-
} else {
|
|
720
|
-
noWhenBranchMatchedException();
|
|
721
|
-
}
|
|
722
|
-
return tmp;
|
|
723
|
-
};
|
|
724
|
-
protoOf(RsaPublicKeyProcessor).oo3 = function (algorithm, format, key) {
|
|
725
|
-
return this.jo5(algorithm, format instanceof Format_3 ? format : THROW_CCE(), key);
|
|
726
|
-
};
|
|
727
|
-
var RsaPublicKeyProcessor_instance;
|
|
728
|
-
function RsaPublicKeyProcessor_getInstance() {
|
|
729
|
-
if (RsaPublicKeyProcessor_instance == null)
|
|
730
|
-
new RsaPublicKeyProcessor();
|
|
731
|
-
return RsaPublicKeyProcessor_instance;
|
|
732
|
-
}
|
|
733
|
-
function RsaPrivateKeyProcessor() {
|
|
734
|
-
RsaPrivateKeyProcessor_instance = this;
|
|
735
|
-
WebCryptoKeyProcessor.call(this);
|
|
736
|
-
}
|
|
737
|
-
protoOf(RsaPrivateKeyProcessor).ko5 = function (format) {
|
|
738
|
-
var tmp;
|
|
739
|
-
if (equals(format, JWK_getInstance_2())) {
|
|
740
|
-
tmp = 'jwk';
|
|
741
|
-
} else if (equals(format, Generic_getInstance_3()) || equals(format, Generic_getInstance_4()) || (equals(format, PKCS1_getInstance_1()) || equals(format, PKCS1_getInstance_2()))) {
|
|
742
|
-
tmp = 'pkcs8';
|
|
743
|
-
} else {
|
|
744
|
-
noWhenBranchMatchedException();
|
|
745
|
-
}
|
|
746
|
-
return tmp;
|
|
747
|
-
};
|
|
748
|
-
protoOf(RsaPrivateKeyProcessor).mo3 = function (format) {
|
|
749
|
-
return this.ko5(format instanceof Format_4 ? format : THROW_CCE());
|
|
750
|
-
};
|
|
751
|
-
protoOf(RsaPrivateKeyProcessor).lo5 = function (algorithm, format, key) {
|
|
752
|
-
var tmp;
|
|
753
|
-
if (equals(format, JWK_getInstance_2())) {
|
|
754
|
-
tmp = key;
|
|
755
|
-
} else if (equals(format, Generic_getInstance_3())) {
|
|
756
|
-
tmp = key;
|
|
757
|
-
} else if (equals(format, Generic_getInstance_4())) {
|
|
758
|
-
tmp = unwrapPem(Companion_getInstance_10().yo2_1, key);
|
|
759
|
-
} else if (equals(format, PKCS1_getInstance_1())) {
|
|
760
|
-
tmp = wrapPrivateKeyInfo(0, RsaKeyAlgorithmIdentifier_instance, key);
|
|
761
|
-
} else if (equals(format, PKCS1_getInstance_2())) {
|
|
762
|
-
tmp = wrapPrivateKeyInfo(0, RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().ao3_1, key));
|
|
763
|
-
} else {
|
|
764
|
-
noWhenBranchMatchedException();
|
|
765
|
-
}
|
|
766
|
-
return tmp;
|
|
767
|
-
};
|
|
768
|
-
protoOf(RsaPrivateKeyProcessor).oo3 = function (algorithm, format, key) {
|
|
769
|
-
return this.lo5(algorithm, format instanceof Format_4 ? format : THROW_CCE(), key);
|
|
770
|
-
};
|
|
771
|
-
var RsaPrivateKeyProcessor_instance;
|
|
772
|
-
function RsaPrivateKeyProcessor_getInstance() {
|
|
773
|
-
if (RsaPrivateKeyProcessor_instance == null)
|
|
774
|
-
new RsaPrivateKeyProcessor();
|
|
775
|
-
return RsaPrivateKeyProcessor_instance;
|
|
776
|
-
}
|
|
777
|
-
function RsaOaepKeyPair(publicKey, privateKey) {
|
|
778
|
-
this.mo5_1 = publicKey;
|
|
779
|
-
this.no5_1 = privateKey;
|
|
780
|
-
}
|
|
781
|
-
function RsaOaepPublicKey(publicKey) {
|
|
782
|
-
RsaPublicKey.call(this, publicKey);
|
|
783
|
-
}
|
|
784
|
-
function RsaOaepPrivateKey(privateKey) {
|
|
785
|
-
RsaPrivateKey.call(this, privateKey);
|
|
786
|
-
}
|
|
787
|
-
function WebCryptoRsaOaep$RsaOaepPublicKey$_init_$ref_2xzkj4() {
|
|
788
|
-
var l = function (p0) {
|
|
789
|
-
return new RsaOaepPublicKey(p0);
|
|
790
|
-
};
|
|
791
|
-
l.callableName = '<init>';
|
|
792
|
-
return l;
|
|
793
|
-
}
|
|
794
|
-
function WebCryptoRsaOaep$RsaOaepPrivateKey$_init_$ref_ds5c3s() {
|
|
795
|
-
var l = function (p0) {
|
|
796
|
-
return new RsaOaepPrivateKey(p0);
|
|
797
|
-
};
|
|
798
|
-
l.callableName = '<init>';
|
|
799
|
-
return l;
|
|
800
|
-
}
|
|
801
|
-
function WebCryptoRsaOaep$RsaOaepKeyPair$_init_$ref_whtofn() {
|
|
802
|
-
var l = function (p0, p1) {
|
|
803
|
-
return new RsaOaepKeyPair(p0, p1);
|
|
804
|
-
};
|
|
805
|
-
l.callableName = '<init>';
|
|
806
|
-
return l;
|
|
807
|
-
}
|
|
808
|
-
function WebCryptoRsaOaep() {
|
|
809
|
-
WebCryptoRsaOaep_instance = this;
|
|
810
|
-
// Inline function 'kotlin.arrayOf' call
|
|
811
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
812
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
813
|
-
var tmp = ['encrypt'];
|
|
814
|
-
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoRsaOaep$RsaOaepPublicKey$_init_$ref_2xzkj4());
|
|
815
|
-
// Inline function 'kotlin.arrayOf' call
|
|
816
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
817
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
818
|
-
var tmp_1 = ['decrypt'];
|
|
819
|
-
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoRsaOaep$RsaOaepPrivateKey$_init_$ref_ds5c3s());
|
|
820
|
-
WebCryptoRsa.call(this, 'RSA-OAEP', tmp_0, tmp_2, WebCryptoRsaOaep$RsaOaepKeyPair$_init_$ref_whtofn());
|
|
821
|
-
}
|
|
822
|
-
var WebCryptoRsaOaep_instance;
|
|
823
|
-
function WebCryptoRsaOaep_getInstance() {
|
|
824
|
-
if (WebCryptoRsaOaep_instance == null)
|
|
825
|
-
new WebCryptoRsaOaep();
|
|
826
|
-
return WebCryptoRsaOaep_instance;
|
|
827
|
-
}
|
|
828
|
-
function RsaPkcs1KeyPair(publicKey, privateKey) {
|
|
829
|
-
this.oo5_1 = publicKey;
|
|
830
|
-
this.po5_1 = privateKey;
|
|
831
|
-
}
|
|
832
|
-
function RsaPkcs1PublicKey(publicKey) {
|
|
833
|
-
RsaPublicKey.call(this, publicKey);
|
|
834
|
-
}
|
|
835
|
-
function RsaPkcs1PrivateKey(privateKey) {
|
|
836
|
-
RsaPrivateKey.call(this, privateKey);
|
|
837
|
-
}
|
|
838
|
-
function WebCryptoRsaPkcs1$RsaPkcs1PublicKey$_init_$ref_kiwvhe() {
|
|
839
|
-
var l = function (p0) {
|
|
840
|
-
return new RsaPkcs1PublicKey(p0);
|
|
841
|
-
};
|
|
842
|
-
l.callableName = '<init>';
|
|
843
|
-
return l;
|
|
844
|
-
}
|
|
845
|
-
function WebCryptoRsaPkcs1$RsaPkcs1PrivateKey$_init_$ref_y0qpl2() {
|
|
846
|
-
var l = function (p0) {
|
|
847
|
-
return new RsaPkcs1PrivateKey(p0);
|
|
848
|
-
};
|
|
849
|
-
l.callableName = '<init>';
|
|
850
|
-
return l;
|
|
851
|
-
}
|
|
852
|
-
function WebCryptoRsaPkcs1$RsaPkcs1KeyPair$_init_$ref_s062w5() {
|
|
853
|
-
var l = function (p0, p1) {
|
|
854
|
-
return new RsaPkcs1KeyPair(p0, p1);
|
|
855
|
-
};
|
|
856
|
-
l.callableName = '<init>';
|
|
857
|
-
return l;
|
|
858
|
-
}
|
|
859
|
-
function WebCryptoRsaPkcs1() {
|
|
860
|
-
WebCryptoRsaPkcs1_instance = this;
|
|
861
|
-
// Inline function 'kotlin.arrayOf' call
|
|
862
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
863
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
864
|
-
var tmp = ['verify'];
|
|
865
|
-
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoRsaPkcs1$RsaPkcs1PublicKey$_init_$ref_kiwvhe());
|
|
866
|
-
// Inline function 'kotlin.arrayOf' call
|
|
867
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
868
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
869
|
-
var tmp_1 = ['sign'];
|
|
870
|
-
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoRsaPkcs1$RsaPkcs1PrivateKey$_init_$ref_y0qpl2());
|
|
871
|
-
WebCryptoRsa.call(this, 'RSASSA-PKCS1-v1_5', tmp_0, tmp_2, WebCryptoRsaPkcs1$RsaPkcs1KeyPair$_init_$ref_s062w5());
|
|
872
|
-
}
|
|
873
|
-
var WebCryptoRsaPkcs1_instance;
|
|
874
|
-
function WebCryptoRsaPkcs1_getInstance() {
|
|
875
|
-
if (WebCryptoRsaPkcs1_instance == null)
|
|
876
|
-
new WebCryptoRsaPkcs1();
|
|
877
|
-
return WebCryptoRsaPkcs1_instance;
|
|
878
|
-
}
|
|
879
|
-
function RsaPssKeyPair(publicKey, privateKey) {
|
|
880
|
-
this.qo5_1 = publicKey;
|
|
881
|
-
this.ro5_1 = privateKey;
|
|
882
|
-
}
|
|
883
|
-
function RsaPssPublicKey(publicKey) {
|
|
884
|
-
RsaPublicKey.call(this, publicKey);
|
|
885
|
-
}
|
|
886
|
-
function RsaPssPrivateKey(privateKey) {
|
|
887
|
-
RsaPrivateKey.call(this, privateKey);
|
|
888
|
-
}
|
|
889
|
-
function WebCryptoRsaPss$RsaPssPublicKey$_init_$ref_o813fm() {
|
|
890
|
-
var l = function (p0) {
|
|
891
|
-
return new RsaPssPublicKey(p0);
|
|
892
|
-
};
|
|
893
|
-
l.callableName = '<init>';
|
|
894
|
-
return l;
|
|
895
|
-
}
|
|
896
|
-
function WebCryptoRsaPss$RsaPssPrivateKey$_init_$ref_6l5g3q() {
|
|
897
|
-
var l = function (p0) {
|
|
898
|
-
return new RsaPssPrivateKey(p0);
|
|
899
|
-
};
|
|
900
|
-
l.callableName = '<init>';
|
|
901
|
-
return l;
|
|
902
|
-
}
|
|
903
|
-
function WebCryptoRsaPss$RsaPssKeyPair$_init_$ref_3h8asb() {
|
|
904
|
-
var l = function (p0, p1) {
|
|
905
|
-
return new RsaPssKeyPair(p0, p1);
|
|
906
|
-
};
|
|
907
|
-
l.callableName = '<init>';
|
|
908
|
-
return l;
|
|
909
|
-
}
|
|
910
|
-
function WebCryptoRsaPss() {
|
|
911
|
-
WebCryptoRsaPss_instance = this;
|
|
912
|
-
// Inline function 'kotlin.arrayOf' call
|
|
913
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
914
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
915
|
-
var tmp = ['verify'];
|
|
916
|
-
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoRsaPss$RsaPssPublicKey$_init_$ref_o813fm());
|
|
917
|
-
// Inline function 'kotlin.arrayOf' call
|
|
918
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
919
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
920
|
-
var tmp_1 = ['sign'];
|
|
921
|
-
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoRsaPss$RsaPssPrivateKey$_init_$ref_6l5g3q());
|
|
922
|
-
WebCryptoRsa.call(this, 'RSA-PSS', tmp_0, tmp_2, WebCryptoRsaPss$RsaPssKeyPair$_init_$ref_3h8asb());
|
|
923
|
-
}
|
|
924
|
-
var WebCryptoRsaPss_instance;
|
|
925
|
-
function WebCryptoRsaPss_getInstance() {
|
|
926
|
-
if (WebCryptoRsaPss_instance == null)
|
|
927
|
-
new WebCryptoRsaPss();
|
|
928
|
-
return WebCryptoRsaPss_instance;
|
|
929
|
-
}
|
|
930
|
-
function hashAlgorithmName(_this__u8e3s4) {
|
|
931
|
-
var tmp;
|
|
932
|
-
if (equals(_this__u8e3s4, SHA1_getInstance())) {
|
|
933
|
-
tmp = 'SHA-1';
|
|
934
|
-
} else if (equals(_this__u8e3s4, SHA256_getInstance())) {
|
|
935
|
-
tmp = 'SHA-256';
|
|
936
|
-
} else if (equals(_this__u8e3s4, SHA384_getInstance())) {
|
|
937
|
-
tmp = 'SHA-384';
|
|
938
|
-
} else if (equals(_this__u8e3s4, SHA512_getInstance())) {
|
|
939
|
-
tmp = 'SHA-512';
|
|
940
|
-
} else {
|
|
941
|
-
throw IllegalStateException_init_$Create$('Unsupported hash algorithm: ' + _this__u8e3s4.hny_1);
|
|
942
|
-
}
|
|
943
|
-
return tmp;
|
|
944
|
-
}
|
|
945
|
-
function nonBlocking() {
|
|
946
|
-
throw IllegalStateException_init_$Create$('Only non-blocking(suspend) calls are supported in WebCrypto');
|
|
947
|
-
}
|
|
948
|
-
function WebCryptoEncodableKey(key, keyProcessor) {
|
|
949
|
-
this.so5_1 = key;
|
|
950
|
-
this.to5_1 = keyProcessor;
|
|
951
|
-
}
|
|
952
|
-
function $decodeFromByteArrayCOROUTINE$(_this__u8e3s4, format, bytes, resultContinuation) {
|
|
953
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
954
|
-
this.co6_1 = _this__u8e3s4;
|
|
955
|
-
this.do6_1 = format;
|
|
956
|
-
this.eo6_1 = bytes;
|
|
957
|
-
}
|
|
958
|
-
protoOf($decodeFromByteArrayCOROUTINE$).q9 = function () {
|
|
959
|
-
var suspendResult = this.k9_1;
|
|
960
|
-
$sm: do
|
|
961
|
-
try {
|
|
962
|
-
var tmp = this.i9_1;
|
|
963
|
-
switch (tmp) {
|
|
964
|
-
case 0:
|
|
965
|
-
this.j9_1 = 2;
|
|
966
|
-
this.fo6_1 = this.co6_1.io6_1.bo4_1;
|
|
967
|
-
this.i9_1 = 1;
|
|
968
|
-
suspendResult = WebCrypto_getInstance().jo6(this.co6_1.ho6_1.mo3(this.do6_1), this.co6_1.ho6_1.oo3(this.co6_1.go6_1, this.do6_1, this.eo6_1), this.co6_1.go6_1, true, this.co6_1.io6_1.ao4_1, this);
|
|
969
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
970
|
-
return suspendResult;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
continue $sm;
|
|
974
|
-
case 1:
|
|
975
|
-
var ARGUMENT = suspendResult;
|
|
976
|
-
return this.fo6_1(ARGUMENT);
|
|
977
|
-
case 2:
|
|
978
|
-
throw this.l9_1;
|
|
979
|
-
}
|
|
980
|
-
} catch ($p) {
|
|
981
|
-
var e = $p;
|
|
982
|
-
if (this.j9_1 === 2) {
|
|
983
|
-
throw e;
|
|
984
|
-
} else {
|
|
985
|
-
this.i9_1 = this.j9_1;
|
|
986
|
-
this.l9_1 = e;
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
while (true);
|
|
990
|
-
};
|
|
991
|
-
function WebCryptoKeyDecoder(algorithm, keyProcessor, keyWrapper) {
|
|
992
|
-
this.go6_1 = algorithm;
|
|
993
|
-
this.ho6_1 = keyProcessor;
|
|
994
|
-
this.io6_1 = keyWrapper;
|
|
995
|
-
}
|
|
996
|
-
protoOf(WebCryptoKeyDecoder).zny = function (format, bytes, $completion) {
|
|
997
|
-
var tmp = new $decodeFromByteArrayCOROUTINE$(this, format, bytes, $completion);
|
|
998
|
-
tmp.k9_1 = Unit_instance;
|
|
999
|
-
tmp.l9_1 = null;
|
|
1000
|
-
return tmp.q9();
|
|
1001
|
-
};
|
|
1002
|
-
protoOf(WebCryptoKeyDecoder).anz = function (format, bytes) {
|
|
1003
|
-
nonBlocking();
|
|
1004
|
-
};
|
|
1005
|
-
function WebCryptoKeyProcessor() {
|
|
1006
|
-
}
|
|
1007
|
-
function WebCryptoKeyWrapper(usages, wrap) {
|
|
1008
|
-
this.ao4_1 = usages;
|
|
1009
|
-
this.bo4_1 = wrap;
|
|
1010
|
-
}
|
|
1011
|
-
function WebCryptoSignatureGenerator(algorithm, key) {
|
|
1012
|
-
this.ko6_1 = algorithm;
|
|
1013
|
-
this.lo6_1 = key;
|
|
1014
|
-
}
|
|
1015
|
-
protoOf(WebCryptoSignatureGenerator).hnz = function (data, $completion) {
|
|
1016
|
-
return WebCrypto_getInstance().mo6(this.ko6_1, this.lo6_1, data, $completion);
|
|
1017
|
-
};
|
|
1018
|
-
protoOf(WebCryptoSignatureGenerator).gnz = function () {
|
|
1019
|
-
nonBlocking();
|
|
1020
|
-
};
|
|
1021
|
-
protoOf(WebCryptoSignatureGenerator).inz = function (data) {
|
|
1022
|
-
nonBlocking();
|
|
1023
|
-
};
|
|
1024
|
-
function get_initHook() {
|
|
1025
|
-
return initHook;
|
|
1026
|
-
}
|
|
1027
|
-
var initHook;
|
|
1028
|
-
function initHook$init$() {
|
|
1029
|
-
CryptographySystem_getInstance().tny(get_defaultProvider(), 100);
|
|
1030
|
-
return Unit_instance;
|
|
1031
|
-
}
|
|
1032
|
-
function get_ecKeyAlgorithmNamedCurve(_this__u8e3s4) {
|
|
1033
|
-
return ecKeyAlgorithmNamedCurve(_this__u8e3s4);
|
|
1034
|
-
}
|
|
1035
|
-
function Algorithm(name) {
|
|
1036
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
1037
|
-
return {name: name};
|
|
1038
|
-
}
|
|
1039
|
-
function HmacKeyAlgorithm(hash, length) {
|
|
1040
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
1041
|
-
return length == null ? {name: 'HMAC', hash: hash} : {name: 'HMAC', hash: hash, length: length};
|
|
1042
|
-
}
|
|
1043
|
-
function ecKeyAlgorithmNamedCurve(algorithm) {
|
|
1044
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
1045
|
-
return algorithm.namedCurve;
|
|
1046
|
-
}
|
|
1047
|
-
function getSubtleCrypto() {
|
|
1048
|
-
var tmp0_safe_receiver = getCrypto();
|
|
1049
|
-
var tmp0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.subtle;
|
|
1050
|
-
var tmp$ret$1;
|
|
1051
|
-
$l$block: {
|
|
1052
|
-
// Inline function 'kotlin.requireNotNull' call
|
|
1053
|
-
if (tmp0 == null) {
|
|
1054
|
-
var message = 'WebCrypto API is not available. Check Secure Contexts definition (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) or report an issue';
|
|
1055
|
-
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1056
|
-
} else {
|
|
1057
|
-
tmp$ret$1 = tmp0;
|
|
1058
|
-
break $l$block;
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
return tmp$ret$1;
|
|
1062
|
-
}
|
|
1063
|
-
function getCrypto() {
|
|
1064
|
-
return globalThis ? globalThis.crypto : window.crypto || window.msCrypto;
|
|
1065
|
-
}
|
|
1066
|
-
function $digestCOROUTINE$(_this__u8e3s4, algorithmName, data, resultContinuation) {
|
|
1067
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1068
|
-
this.vo6_1 = _this__u8e3s4;
|
|
1069
|
-
this.wo6_1 = algorithmName;
|
|
1070
|
-
this.xo6_1 = data;
|
|
1071
|
-
}
|
|
1072
|
-
protoOf($digestCOROUTINE$).q9 = function () {
|
|
1073
|
-
var suspendResult = this.k9_1;
|
|
1074
|
-
$sm: do
|
|
1075
|
-
try {
|
|
1076
|
-
var tmp = this.i9_1;
|
|
1077
|
-
switch (tmp) {
|
|
1078
|
-
case 0:
|
|
1079
|
-
this.j9_1 = 2;
|
|
1080
|
-
this.i9_1 = 1;
|
|
1081
|
-
suspendResult = await_0(this.vo6_1.so3_1.digest(this.wo6_1, this.xo6_1), this);
|
|
1082
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1083
|
-
return suspendResult;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
continue $sm;
|
|
1087
|
-
case 1:
|
|
1088
|
-
var ARGUMENT = suspendResult;
|
|
1089
|
-
return toByteArray(ARGUMENT);
|
|
1090
|
-
case 2:
|
|
1091
|
-
throw this.l9_1;
|
|
1092
|
-
}
|
|
1093
|
-
} catch ($p) {
|
|
1094
|
-
var e = $p;
|
|
1095
|
-
if (this.j9_1 === 2) {
|
|
1096
|
-
throw e;
|
|
1097
|
-
} else {
|
|
1098
|
-
this.i9_1 = this.j9_1;
|
|
1099
|
-
this.l9_1 = e;
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
while (true);
|
|
1103
|
-
};
|
|
1104
|
-
function $signCOROUTINE$(_this__u8e3s4, algorithm, key, data, resultContinuation) {
|
|
1105
|
-
CoroutineImpl.call(this, resultContinuation);
|
|
1106
|
-
this.go7_1 = _this__u8e3s4;
|
|
1107
|
-
this.ho7_1 = algorithm;
|
|
1108
|
-
this.io7_1 = key;
|
|
1109
|
-
this.jo7_1 = data;
|
|
1110
|
-
}
|
|
1111
|
-
protoOf($signCOROUTINE$).q9 = function () {
|
|
1112
|
-
var suspendResult = this.k9_1;
|
|
1113
|
-
$sm: do
|
|
1114
|
-
try {
|
|
1115
|
-
var tmp = this.i9_1;
|
|
1116
|
-
switch (tmp) {
|
|
1117
|
-
case 0:
|
|
1118
|
-
this.j9_1 = 2;
|
|
1119
|
-
this.i9_1 = 1;
|
|
1120
|
-
suspendResult = await_0(this.go7_1.so3_1.sign(this.ho7_1, this.io7_1, this.jo7_1), this);
|
|
1121
|
-
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1122
|
-
return suspendResult;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
continue $sm;
|
|
1126
|
-
case 1:
|
|
1127
|
-
var ARGUMENT = suspendResult;
|
|
1128
|
-
return toByteArray(ARGUMENT);
|
|
1129
|
-
case 2:
|
|
1130
|
-
throw this.l9_1;
|
|
1131
|
-
}
|
|
1132
|
-
} catch ($p) {
|
|
1133
|
-
var e = $p;
|
|
1134
|
-
if (this.j9_1 === 2) {
|
|
1135
|
-
throw e;
|
|
1136
|
-
} else {
|
|
1137
|
-
this.i9_1 = this.j9_1;
|
|
1138
|
-
this.l9_1 = e;
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
while (true);
|
|
1142
|
-
};
|
|
1143
|
-
function WebCrypto() {
|
|
1144
|
-
WebCrypto_instance = this;
|
|
1145
|
-
this.so3_1 = getSubtleCrypto();
|
|
1146
|
-
}
|
|
1147
|
-
protoOf(WebCrypto).to3 = function (algorithmName, data, $completion) {
|
|
1148
|
-
var tmp = new $digestCOROUTINE$(this, algorithmName, data, $completion);
|
|
1149
|
-
tmp.k9_1 = Unit_instance;
|
|
1150
|
-
tmp.l9_1 = null;
|
|
1151
|
-
return tmp.q9();
|
|
1152
|
-
};
|
|
1153
|
-
protoOf(WebCrypto).mo6 = function (algorithm, key, data, $completion) {
|
|
1154
|
-
var tmp = new $signCOROUTINE$(this, algorithm, key, data, $completion);
|
|
1155
|
-
tmp.k9_1 = Unit_instance;
|
|
1156
|
-
tmp.l9_1 = null;
|
|
1157
|
-
return tmp.q9();
|
|
1158
|
-
};
|
|
1159
|
-
protoOf(WebCrypto).jo6 = function (format, keyData, algorithm, extractable, keyUsages, $completion) {
|
|
1160
|
-
var key = format === 'jwk' ? JSON.parse(decodeToString(keyData)) : keyData;
|
|
1161
|
-
return await_0(this.so3_1.importKey(format, key, algorithm, extractable, keyUsages), $completion);
|
|
1162
|
-
};
|
|
1163
|
-
var WebCrypto_instance;
|
|
1164
|
-
function WebCrypto_getInstance() {
|
|
1165
|
-
if (WebCrypto_instance == null)
|
|
1166
|
-
new WebCrypto();
|
|
1167
|
-
return WebCrypto_instance;
|
|
1168
|
-
}
|
|
1169
|
-
function toByteArray(_this__u8e3s4) {
|
|
1170
|
-
// Inline function 'kotlin.js.unsafeCast' call
|
|
1171
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
1172
|
-
return new Int8Array(_this__u8e3s4);
|
|
1173
|
-
}
|
|
1174
|
-
function await_0(_this__u8e3s4, $completion) {
|
|
1175
|
-
var safe = SafeContinuation_init_$Create$(intercepted($completion));
|
|
1176
|
-
var tmp = await$lambda(safe);
|
|
1177
|
-
_this__u8e3s4.then(tmp, await$lambda_0(safe));
|
|
1178
|
-
return safe.aa();
|
|
1179
|
-
}
|
|
1180
|
-
function await$lambda($continuation) {
|
|
1181
|
-
return function (it) {
|
|
1182
|
-
// Inline function 'kotlin.coroutines.resume' call
|
|
1183
|
-
var this_0 = $continuation;
|
|
1184
|
-
// Inline function 'kotlin.Companion.success' call
|
|
1185
|
-
var tmp$ret$0 = _Result___init__impl__xyqfz8(it);
|
|
1186
|
-
this_0.t9(tmp$ret$0);
|
|
1187
|
-
return null;
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
|
-
function await$lambda_0($continuation) {
|
|
1191
|
-
return function (it) {
|
|
1192
|
-
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
1193
|
-
var this_0 = $continuation;
|
|
1194
|
-
// Inline function 'kotlin.Companion.failure' call
|
|
1195
|
-
var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(it));
|
|
1196
|
-
this_0.t9(tmp$ret$0);
|
|
1197
|
-
return null;
|
|
1198
|
-
};
|
|
1199
|
-
}
|
|
1200
|
-
//region block: init
|
|
1201
|
-
WebCryptoHkdf_instance = new WebCryptoHkdf();
|
|
1202
|
-
WebCryptoPbkdf2_instance = new WebCryptoPbkdf2();
|
|
1203
|
-
//endregion
|
|
1204
|
-
//region block: eager init
|
|
1205
|
-
initHook = initHook$init$();
|
|
1206
|
-
//endregion
|
|
1207
|
-
//region block: exports
|
|
1208
|
-
function $jsExportAll$(_) {
|
|
1209
|
-
var $dev = _.dev || (_.dev = {});
|
|
1210
|
-
var $dev$whyoleg = $dev.whyoleg || ($dev.whyoleg = {});
|
|
1211
|
-
var $dev$whyoleg$cryptography = $dev$whyoleg.cryptography || ($dev$whyoleg.cryptography = {});
|
|
1212
|
-
var $dev$whyoleg$cryptography$providers = $dev$whyoleg$cryptography.providers || ($dev$whyoleg$cryptography.providers = {});
|
|
1213
|
-
var $dev$whyoleg$cryptography$providers$webcrypto = $dev$whyoleg$cryptography$providers.webcrypto || ($dev$whyoleg$cryptography$providers.webcrypto = {});
|
|
1214
|
-
defineProp($dev$whyoleg$cryptography$providers$webcrypto, 'initHook', get_initHook, VOID, true);
|
|
1215
|
-
}
|
|
1216
|
-
$jsExportAll$(_);
|
|
1217
|
-
_.$jsExportAll$ = $jsExportAll$;
|
|
1218
|
-
//endregion
|
|
1219
|
-
return _;
|
|
1220
|
-
}));
|
|
1221
|
-
|
|
1222
|
-
//# sourceMappingURL=cryptography-kotlin-cryptography-provider-webcrypto.js.map
|