@solibo/solibo-sdk 1.0.36 → 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 -583
- package/index.js +2 -582
- 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 -196402
- package/solibo-sdk-sdk-home-api.js.map +0 -1
- package/solibo-sdk-sdk.d.ts +0 -14334
- package/solibo-sdk-sdk.js +0 -7897
- package/solibo-sdk-sdk.js.map +0 -1
|
@@ -0,0 +1,1195 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CryptographyProviderwgv0x40nzvjc as CryptographyProvider,
|
|
3
|
+
Companion_getInstancebyslzqcunhpa as Companion_getInstance,
|
|
4
|
+
Companion_getInstance27u04a1q2cj1l as Companion_getInstance_0,
|
|
5
|
+
Companion_getInstance1b33mcojr5zhq as Companion_getInstance_1,
|
|
6
|
+
Companion_getInstance3av3p4gc6a7jn as Companion_getInstance_2,
|
|
7
|
+
Companion_getInstance3ark4b05maj30 as Companion_getInstance_3,
|
|
8
|
+
Companion_getInstancei93icbc9wljv as Companion_getInstance_4,
|
|
9
|
+
Companion_getInstance1xf5ipdr52o1p as Companion_getInstance_5,
|
|
10
|
+
Companion_getInstance1x88e8a93nrjt as Companion_getInstance_6,
|
|
11
|
+
Companion_getInstance29kae6fn9dtdp as Companion_getInstance_7,
|
|
12
|
+
Companion_getInstance14mxn5i96muxk as Companion_getInstance_8,
|
|
13
|
+
Companion_getInstance1ols9hsmvo0w0 as Companion_getInstance_9,
|
|
14
|
+
SHA512_getInstance2nwy6uke6ngga as SHA512_getInstance,
|
|
15
|
+
SHA384_getInstance3dym6gio4iqu3 as SHA384_getInstance,
|
|
16
|
+
SHA256_getInstanceth9eotqeth9c as SHA256_getInstance,
|
|
17
|
+
SHA1_getInstance3jravpw4war2y as SHA1_getInstance,
|
|
18
|
+
CryptographyAlgorithmhhdrgo7p9qei as CryptographyAlgorithm,
|
|
19
|
+
Format3dwngdi37q0un as Format,
|
|
20
|
+
Hashera1nteuzom60c as Hasher,
|
|
21
|
+
DER_getInstancetcz4fdgsag6y as DER_getInstance,
|
|
22
|
+
PEM_getInstance2z3eojfgxggki as PEM_getInstance,
|
|
23
|
+
Uncompressed_getInstance30v9709kpt3rd as Uncompressed_getInstance,
|
|
24
|
+
Compressed_getInstance2bou73k6m6h1m as Compressed_getInstance,
|
|
25
|
+
JWK_getInstance2g6m6ouqgdqfw as JWK_getInstance,
|
|
26
|
+
Format1u440c2w9z1t5 as Format_0,
|
|
27
|
+
RAW_getInstance1owkiklujln96 as RAW_getInstance,
|
|
28
|
+
Generic_getInstance2fofokuhcjf0m as Generic_getInstance,
|
|
29
|
+
Generic_getInstance2z3qu9f7wt665 as Generic_getInstance_0,
|
|
30
|
+
SEC1_getInstance1h1itfa9pvqru as SEC1_getInstance,
|
|
31
|
+
SEC1_getInstance19ihk9fm1tmnu as SEC1_getInstance_0,
|
|
32
|
+
JWK_getInstance1yvqt4fvwl3gg as JWK_getInstance_0,
|
|
33
|
+
Format2r6rz6bygg1d5 as Format_1,
|
|
34
|
+
Companion_instance2xzuy5itlbd7r as Companion_instance,
|
|
35
|
+
_Curve___get_name__impl__klrusc2ntyd3phrcyut as _Curve___get_name__impl__klrusc,
|
|
36
|
+
Format1jug7lc3rg0qd as Format_2,
|
|
37
|
+
Generic_getInstanced4eii9e2nhqx as Generic_getInstance_1,
|
|
38
|
+
Generic_getInstance1ub4kp2qez9cr as Generic_getInstance_2,
|
|
39
|
+
PKCS1_getInstance22spptdubofqd as PKCS1_getInstance,
|
|
40
|
+
PKCS1_getInstance5evnhy9k9oay as PKCS1_getInstance_0,
|
|
41
|
+
JWK_getInstance2h7f972qw3rxx as JWK_getInstance_1,
|
|
42
|
+
Format2v29dvc3oaj5k as Format_3,
|
|
43
|
+
Generic_getInstanceuanw2vo9armh as Generic_getInstance_3,
|
|
44
|
+
Generic_getInstance7jxucsv5q1mh as Generic_getInstance_4,
|
|
45
|
+
PKCS1_getInstance868e3tfzube as PKCS1_getInstance_1,
|
|
46
|
+
PKCS1_getInstance3a4r0yeoubefu as PKCS1_getInstance_2,
|
|
47
|
+
JWK_getInstance1fp08shy8nryg as JWK_getInstance_2,
|
|
48
|
+
Format1i0i1l8xjk06m as Format_4,
|
|
49
|
+
KeyDecoder1aj9ibfkm03tn as KeyDecoder,
|
|
50
|
+
SignatureGenerator3tx2fdhty5h2c as SignatureGenerator,
|
|
51
|
+
CryptographySystem_getInstance1v1h7y5ver0lp as CryptographySystem_getInstance,
|
|
52
|
+
} from './cryptography-kotlin-cryptography-core.mjs';
|
|
53
|
+
import {
|
|
54
|
+
equals2au1ep9vhcato as equals,
|
|
55
|
+
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
56
|
+
isInterface3d6p8outrmvmk as isInterface,
|
|
57
|
+
protoOf180f3jzyo7rfj as protoOf,
|
|
58
|
+
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
59
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
60
|
+
lazy2hsh8ze7j6ikd as lazy,
|
|
61
|
+
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
62
|
+
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
63
|
+
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
64
|
+
toString1pkumu07cwy4m as toString,
|
|
65
|
+
IllegalStateException_init_$Create$2429fvs1h56dm as IllegalStateException_init_$Create$,
|
|
66
|
+
CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
|
|
67
|
+
get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
|
|
68
|
+
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
|
|
69
|
+
Unit_instance28fytmsmm6r23 as Unit_instance,
|
|
70
|
+
IllegalArgumentException_init_$Create$1j1aj36nbo0wg as IllegalArgumentException_init_$Create$,
|
|
71
|
+
decodeToString1x4faah2liw2p as decodeToString,
|
|
72
|
+
intercepted2ogpsikxxj4u0 as intercepted,
|
|
73
|
+
SafeContinuation_init_$Create$1psyp4r0sb3mp as SafeContinuation_init_$Create$,
|
|
74
|
+
Companion_instance25ullnynvxd0w as Companion_instance_0,
|
|
75
|
+
_Result___init__impl__xyqfz83a5421h46yeyh as _Result___init__impl__xyqfz8,
|
|
76
|
+
createFailure8paxfkfa5dc7 as createFailure,
|
|
77
|
+
} from './kotlin-kotlin-stdlib.mjs';
|
|
78
|
+
import { Companion_getInstance3pdkh2psd8hnn as Companion_getInstance_10 } from './cryptography-kotlin-cryptography-serialization-pem.mjs';
|
|
79
|
+
import {
|
|
80
|
+
unwrapPem161z0z59ia531 as unwrapPem,
|
|
81
|
+
convertEcPrivateKeyFromSec1ToPkcs81ruidkpvnvcm1 as convertEcPrivateKeyFromSec1ToPkcs8,
|
|
82
|
+
wrapPrivateKeyInfo2mp8aghrbbbyt as wrapPrivateKeyInfo,
|
|
83
|
+
wrapSubjectPublicKeyInfo1w2wxg0b5ey1b as wrapSubjectPublicKeyInfo,
|
|
84
|
+
} from './cryptography-kotlin-cryptography-provider-base.mjs';
|
|
85
|
+
import {
|
|
86
|
+
Companion_instance3nsfjzff13l9z as Companion_instance_1,
|
|
87
|
+
Default_getInstance3bn6zrp4tkdoy as Default_getInstance,
|
|
88
|
+
} from './cryptography-kotlin-cryptography-serialization-asn1.mjs';
|
|
89
|
+
import {
|
|
90
|
+
get_secp521r13hkek2jcv829c as get_secp521r1,
|
|
91
|
+
get_secp384r13mvgyp383nadu as get_secp384r1,
|
|
92
|
+
get_secp256r12zskpql6xanyk as get_secp256r1,
|
|
93
|
+
_EcParameters___init__impl__i4ww9zuq3d437583rt as _EcParameters___init__impl__i4ww9z,
|
|
94
|
+
EcKeyAlgorithmIdentifierwk35bb676c3o as EcKeyAlgorithmIdentifier,
|
|
95
|
+
Companion_instancee26uvkz58yu2 as Companion_instance_2,
|
|
96
|
+
EcPrivateKey2terz948ch7xt as EcPrivateKey,
|
|
97
|
+
RsaKeyAlgorithmIdentifier_instance1snja7vvnuucb as RsaKeyAlgorithmIdentifier_instance,
|
|
98
|
+
} from './cryptography-kotlin-cryptography-serialization-asn1-modules.mjs';
|
|
99
|
+
//region block: imports
|
|
100
|
+
//endregion
|
|
101
|
+
//region block: pre-declaration
|
|
102
|
+
initMetadataForObject(WebCryptoCryptographyProvider, 'WebCryptoCryptographyProvider', VOID, CryptographyProvider);
|
|
103
|
+
initMetadataForClass(WebCryptoEncodableKey, 'WebCryptoEncodableKey', VOID, VOID, VOID, [1]);
|
|
104
|
+
initMetadataForClass(AesKey, 'AesKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
105
|
+
initMetadataForClass(WebCryptoAes, 'WebCryptoAes', VOID, VOID, [CryptographyAlgorithm]);
|
|
106
|
+
initMetadataForClass(WebCryptoKeyProcessor, 'WebCryptoKeyProcessor');
|
|
107
|
+
initMetadataForObject(AesKeyProcessor, 'AesKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
108
|
+
initMetadataForClass(AesCbcKey, 'AesCbcKey', VOID, AesKey, VOID, [1]);
|
|
109
|
+
initMetadataForObject(WebCryptoAesCbc, 'WebCryptoAesCbc', VOID, WebCryptoAes, [WebCryptoAes, CryptographyAlgorithm]);
|
|
110
|
+
initMetadataForClass(AesCtrKey, 'AesCtrKey', VOID, AesKey, VOID, [1]);
|
|
111
|
+
initMetadataForObject(WebCryptoAesCtr, 'WebCryptoAesCtr', VOID, WebCryptoAes, [WebCryptoAes, CryptographyAlgorithm]);
|
|
112
|
+
initMetadataForClass(AesGcmKey, 'AesGcmKey', VOID, AesKey, VOID, [1]);
|
|
113
|
+
initMetadataForObject(WebCryptoAesGcm, 'WebCryptoAesGcm', VOID, WebCryptoAes, [WebCryptoAes, CryptographyAlgorithm]);
|
|
114
|
+
initMetadataForCompanion(Companion);
|
|
115
|
+
initMetadataForClass(WebCryptoDigest, 'WebCryptoDigest', VOID, VOID, [CryptographyAlgorithm, Hasher], [1]);
|
|
116
|
+
initMetadataForClass(EcPublicKey, 'EcPublicKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
117
|
+
initMetadataForClass(EcPrivateKey_0, 'EcPrivateKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
118
|
+
initMetadataForClass(WebCryptoEc, 'WebCryptoEc', VOID, VOID, [CryptographyAlgorithm]);
|
|
119
|
+
initMetadataForObject(EcPublicKeyProcessor, 'EcPublicKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
120
|
+
initMetadataForObject(EcPrivateKeyProcessor, 'EcPrivateKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
121
|
+
initMetadataForClass(EcdhKeyPair, 'EcdhKeyPair');
|
|
122
|
+
initMetadataForClass(EcdhPublicKey, 'EcdhPublicKey', VOID, EcPublicKey, VOID, [1]);
|
|
123
|
+
initMetadataForClass(EcdhPrivateKey, 'EcdhPrivateKey', VOID, EcPrivateKey_0, VOID, [1]);
|
|
124
|
+
initMetadataForObject(WebCryptoEcdh, 'WebCryptoEcdh', VOID, WebCryptoEc, [WebCryptoEc, CryptographyAlgorithm]);
|
|
125
|
+
initMetadataForClass(EcdsaKeyPair, 'EcdsaKeyPair');
|
|
126
|
+
initMetadataForClass(EcdsaPublicKey, 'EcdsaPublicKey', VOID, EcPublicKey, VOID, [1]);
|
|
127
|
+
initMetadataForClass(EcdsaPrivateKey, 'EcdsaPrivateKey', VOID, EcPrivateKey_0, VOID, [1]);
|
|
128
|
+
initMetadataForObject(WebCryptoEcdsa, 'WebCryptoEcdsa', VOID, WebCryptoEc, [WebCryptoEc, CryptographyAlgorithm]);
|
|
129
|
+
initMetadataForObject(WebCryptoHkdf, 'WebCryptoHkdf', VOID, VOID, [CryptographyAlgorithm]);
|
|
130
|
+
initMetadataForClass(HmacKey, 'HmacKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
131
|
+
initMetadataForObject(WebCryptoHmac, 'WebCryptoHmac', VOID, VOID, [CryptographyAlgorithm]);
|
|
132
|
+
initMetadataForObject(HmacKeyProcessor, 'HmacKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
133
|
+
initMetadataForObject(WebCryptoPbkdf2, 'WebCryptoPbkdf2', VOID, VOID, [CryptographyAlgorithm]);
|
|
134
|
+
initMetadataForClass(RsaPublicKey, 'RsaPublicKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
135
|
+
initMetadataForClass(RsaPrivateKey, 'RsaPrivateKey', VOID, WebCryptoEncodableKey, VOID, [1]);
|
|
136
|
+
initMetadataForClass(WebCryptoRsa, 'WebCryptoRsa', VOID, VOID, [CryptographyAlgorithm]);
|
|
137
|
+
initMetadataForObject(RsaPublicKeyProcessor, 'RsaPublicKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
138
|
+
initMetadataForObject(RsaPrivateKeyProcessor, 'RsaPrivateKeyProcessor', VOID, WebCryptoKeyProcessor);
|
|
139
|
+
initMetadataForClass(RsaOaepKeyPair, 'RsaOaepKeyPair');
|
|
140
|
+
initMetadataForClass(RsaOaepPublicKey, 'RsaOaepPublicKey', VOID, RsaPublicKey, VOID, [1]);
|
|
141
|
+
initMetadataForClass(RsaOaepPrivateKey, 'RsaOaepPrivateKey', VOID, RsaPrivateKey, VOID, [1]);
|
|
142
|
+
initMetadataForObject(WebCryptoRsaOaep, 'WebCryptoRsaOaep', VOID, WebCryptoRsa, [WebCryptoRsa, CryptographyAlgorithm]);
|
|
143
|
+
initMetadataForClass(RsaPkcs1KeyPair, 'RsaPkcs1KeyPair');
|
|
144
|
+
initMetadataForClass(RsaPkcs1PublicKey, 'RsaPkcs1PublicKey', VOID, RsaPublicKey, VOID, [1]);
|
|
145
|
+
initMetadataForClass(RsaPkcs1PrivateKey, 'RsaPkcs1PrivateKey', VOID, RsaPrivateKey, VOID, [1]);
|
|
146
|
+
initMetadataForObject(WebCryptoRsaPkcs1, 'WebCryptoRsaPkcs1', VOID, WebCryptoRsa, [WebCryptoRsa, CryptographyAlgorithm]);
|
|
147
|
+
initMetadataForClass(RsaPssKeyPair, 'RsaPssKeyPair');
|
|
148
|
+
initMetadataForClass(RsaPssPublicKey, 'RsaPssPublicKey', VOID, RsaPublicKey, VOID, [1]);
|
|
149
|
+
initMetadataForClass(RsaPssPrivateKey, 'RsaPssPrivateKey', VOID, RsaPrivateKey, VOID, [1]);
|
|
150
|
+
initMetadataForObject(WebCryptoRsaPss, 'WebCryptoRsaPss', VOID, WebCryptoRsa, [WebCryptoRsa, CryptographyAlgorithm]);
|
|
151
|
+
initMetadataForCoroutine($decodeFromByteArrayCOROUTINE$, CoroutineImpl);
|
|
152
|
+
initMetadataForClass(WebCryptoKeyDecoder, 'WebCryptoKeyDecoder', VOID, VOID, [KeyDecoder], [2]);
|
|
153
|
+
initMetadataForClass(WebCryptoKeyWrapper, 'WebCryptoKeyWrapper');
|
|
154
|
+
initMetadataForClass(WebCryptoSignatureGenerator, 'WebCryptoSignatureGenerator', VOID, VOID, [SignatureGenerator], [1]);
|
|
155
|
+
initMetadataForCoroutine($digestCOROUTINE$, CoroutineImpl);
|
|
156
|
+
initMetadataForCoroutine($signCOROUTINE$, CoroutineImpl);
|
|
157
|
+
initMetadataForObject(WebCrypto, 'WebCrypto', VOID, VOID, VOID, [2, 3, 4, 5]);
|
|
158
|
+
//endregion
|
|
159
|
+
function get_defaultProvider() {
|
|
160
|
+
_init_properties_WebCryptoCryptographyProvider_kt__i22tls();
|
|
161
|
+
return defaultProvider;
|
|
162
|
+
}
|
|
163
|
+
var defaultProvider;
|
|
164
|
+
var WebCrypto$delegate;
|
|
165
|
+
function WebCryptoCryptographyProvider() {
|
|
166
|
+
WebCryptoCryptographyProvider_instance = this;
|
|
167
|
+
CryptographyProvider.call(this);
|
|
168
|
+
}
|
|
169
|
+
protoOf(WebCryptoCryptographyProvider).ko6 = function (identifier) {
|
|
170
|
+
var tmp = equals(identifier, SHA1_getInstance()) ? Companion_getInstance_11().bob_1 : equals(identifier, SHA256_getInstance()) ? Companion_getInstance_11().cob_1 : equals(identifier, SHA384_getInstance()) ? Companion_getInstance_11().dob_1 : equals(identifier, SHA512_getInstance()) ? Companion_getInstance_11().eob_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
|
+
return (tmp == null ? true : isInterface(tmp, CryptographyAlgorithm)) ? tmp : THROW_CCE();
|
|
172
|
+
};
|
|
173
|
+
var WebCryptoCryptographyProvider_instance;
|
|
174
|
+
function WebCryptoCryptographyProvider_getInstance() {
|
|
175
|
+
if (WebCryptoCryptographyProvider_instance == null)
|
|
176
|
+
new WebCryptoCryptographyProvider();
|
|
177
|
+
return WebCryptoCryptographyProvider_instance;
|
|
178
|
+
}
|
|
179
|
+
function defaultProvider$lambda() {
|
|
180
|
+
_init_properties_WebCryptoCryptographyProvider_kt__i22tls();
|
|
181
|
+
return WebCryptoCryptographyProvider_getInstance();
|
|
182
|
+
}
|
|
183
|
+
var properties_initialized_WebCryptoCryptographyProvider_kt_n89q9u;
|
|
184
|
+
function _init_properties_WebCryptoCryptographyProvider_kt__i22tls() {
|
|
185
|
+
if (!properties_initialized_WebCryptoCryptographyProvider_kt_n89q9u) {
|
|
186
|
+
properties_initialized_WebCryptoCryptographyProvider_kt_n89q9u = true;
|
|
187
|
+
defaultProvider = lazy(defaultProvider$lambda);
|
|
188
|
+
WebCrypto$delegate = get_defaultProvider();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function AesKey(key) {
|
|
192
|
+
WebCryptoEncodableKey.call(this, key, AesKeyProcessor_getInstance());
|
|
193
|
+
this.hob_1 = key;
|
|
194
|
+
}
|
|
195
|
+
function WebCryptoAes(algorithmName, keyWrapper) {
|
|
196
|
+
this.iob_1 = algorithmName;
|
|
197
|
+
this.job_1 = keyWrapper;
|
|
198
|
+
}
|
|
199
|
+
function AesKeyProcessor() {
|
|
200
|
+
AesKeyProcessor_instance = this;
|
|
201
|
+
WebCryptoKeyProcessor.call(this);
|
|
202
|
+
}
|
|
203
|
+
protoOf(AesKeyProcessor).kob = function (format) {
|
|
204
|
+
var tmp;
|
|
205
|
+
switch (format.a1_1) {
|
|
206
|
+
case 0:
|
|
207
|
+
tmp = 'raw';
|
|
208
|
+
break;
|
|
209
|
+
case 1:
|
|
210
|
+
tmp = 'jwk';
|
|
211
|
+
break;
|
|
212
|
+
default:
|
|
213
|
+
noWhenBranchMatchedException();
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
return tmp;
|
|
217
|
+
};
|
|
218
|
+
protoOf(AesKeyProcessor).lob = function (format) {
|
|
219
|
+
return this.kob(format instanceof Format ? format : THROW_CCE());
|
|
220
|
+
};
|
|
221
|
+
protoOf(AesKeyProcessor).mob = function (algorithm, format, key) {
|
|
222
|
+
return key;
|
|
223
|
+
};
|
|
224
|
+
protoOf(AesKeyProcessor).nob = function (algorithm, format, key) {
|
|
225
|
+
return this.mob(algorithm, format instanceof Format ? format : THROW_CCE(), key);
|
|
226
|
+
};
|
|
227
|
+
var AesKeyProcessor_instance;
|
|
228
|
+
function AesKeyProcessor_getInstance() {
|
|
229
|
+
if (AesKeyProcessor_instance == null)
|
|
230
|
+
new AesKeyProcessor();
|
|
231
|
+
return AesKeyProcessor_instance;
|
|
232
|
+
}
|
|
233
|
+
function AesCbcKey(key) {
|
|
234
|
+
AesKey.call(this, key);
|
|
235
|
+
}
|
|
236
|
+
function WebCryptoAesCbc$AesCbcKey$_init_$ref_lop2vf() {
|
|
237
|
+
var l = function (p0) {
|
|
238
|
+
return new AesCbcKey(p0);
|
|
239
|
+
};
|
|
240
|
+
l.callableName = '<init>';
|
|
241
|
+
return l;
|
|
242
|
+
}
|
|
243
|
+
function WebCryptoAesCbc() {
|
|
244
|
+
WebCryptoAesCbc_instance = this;
|
|
245
|
+
// Inline function 'kotlin.arrayOf' call
|
|
246
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
247
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
248
|
+
var tmp = ['encrypt', 'decrypt'];
|
|
249
|
+
WebCryptoAes.call(this, 'AES-CBC', new WebCryptoKeyWrapper(tmp, WebCryptoAesCbc$AesCbcKey$_init_$ref_lop2vf()));
|
|
250
|
+
}
|
|
251
|
+
var WebCryptoAesCbc_instance;
|
|
252
|
+
function WebCryptoAesCbc_getInstance() {
|
|
253
|
+
if (WebCryptoAesCbc_instance == null)
|
|
254
|
+
new WebCryptoAesCbc();
|
|
255
|
+
return WebCryptoAesCbc_instance;
|
|
256
|
+
}
|
|
257
|
+
function AesCtrKey(key) {
|
|
258
|
+
AesKey.call(this, key);
|
|
259
|
+
}
|
|
260
|
+
function WebCryptoAesCtr$AesCtrKey$_init_$ref_5qzjvv() {
|
|
261
|
+
var l = function (p0) {
|
|
262
|
+
return new AesCtrKey(p0);
|
|
263
|
+
};
|
|
264
|
+
l.callableName = '<init>';
|
|
265
|
+
return l;
|
|
266
|
+
}
|
|
267
|
+
function WebCryptoAesCtr() {
|
|
268
|
+
WebCryptoAesCtr_instance = this;
|
|
269
|
+
// Inline function 'kotlin.arrayOf' call
|
|
270
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
271
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
272
|
+
var tmp = ['encrypt', 'decrypt'];
|
|
273
|
+
WebCryptoAes.call(this, 'AES-CTR', new WebCryptoKeyWrapper(tmp, WebCryptoAesCtr$AesCtrKey$_init_$ref_5qzjvv()));
|
|
274
|
+
}
|
|
275
|
+
var WebCryptoAesCtr_instance;
|
|
276
|
+
function WebCryptoAesCtr_getInstance() {
|
|
277
|
+
if (WebCryptoAesCtr_instance == null)
|
|
278
|
+
new WebCryptoAesCtr();
|
|
279
|
+
return WebCryptoAesCtr_instance;
|
|
280
|
+
}
|
|
281
|
+
function AesGcmKey(key) {
|
|
282
|
+
AesKey.call(this, key);
|
|
283
|
+
}
|
|
284
|
+
function WebCryptoAesGcm$AesGcmKey$_init_$ref_c6pr3f() {
|
|
285
|
+
var l = function (p0) {
|
|
286
|
+
return new AesGcmKey(p0);
|
|
287
|
+
};
|
|
288
|
+
l.callableName = '<init>';
|
|
289
|
+
return l;
|
|
290
|
+
}
|
|
291
|
+
function WebCryptoAesGcm() {
|
|
292
|
+
WebCryptoAesGcm_instance = this;
|
|
293
|
+
// Inline function 'kotlin.arrayOf' call
|
|
294
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
295
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
296
|
+
var tmp = ['encrypt', 'decrypt'];
|
|
297
|
+
WebCryptoAes.call(this, 'AES-GCM', new WebCryptoKeyWrapper(tmp, WebCryptoAesGcm$AesGcmKey$_init_$ref_c6pr3f()));
|
|
298
|
+
}
|
|
299
|
+
var WebCryptoAesGcm_instance;
|
|
300
|
+
function WebCryptoAesGcm_getInstance() {
|
|
301
|
+
if (WebCryptoAesGcm_instance == null)
|
|
302
|
+
new WebCryptoAesGcm();
|
|
303
|
+
return WebCryptoAesGcm_instance;
|
|
304
|
+
}
|
|
305
|
+
function Companion() {
|
|
306
|
+
Companion_instance_3 = this;
|
|
307
|
+
this.bob_1 = new WebCryptoDigest('SHA-1', SHA1_getInstance());
|
|
308
|
+
this.cob_1 = new WebCryptoDigest('SHA-256', SHA256_getInstance());
|
|
309
|
+
this.dob_1 = new WebCryptoDigest('SHA-384', SHA384_getInstance());
|
|
310
|
+
this.eob_1 = new WebCryptoDigest('SHA-512', SHA512_getInstance());
|
|
311
|
+
}
|
|
312
|
+
var Companion_instance_3;
|
|
313
|
+
function Companion_getInstance_11() {
|
|
314
|
+
if (Companion_instance_3 == null)
|
|
315
|
+
new Companion();
|
|
316
|
+
return Companion_instance_3;
|
|
317
|
+
}
|
|
318
|
+
function WebCryptoDigest(algorithm, id) {
|
|
319
|
+
Companion_getInstance_11();
|
|
320
|
+
this.oob_1 = algorithm;
|
|
321
|
+
this.pob_1 = id;
|
|
322
|
+
}
|
|
323
|
+
protoOf(WebCryptoDigest).qob = function () {
|
|
324
|
+
return this;
|
|
325
|
+
};
|
|
326
|
+
protoOf(WebCryptoDigest).bo7 = function (data, $completion) {
|
|
327
|
+
return WebCrypto_getInstance().sob(this.oob_1, data, $completion);
|
|
328
|
+
};
|
|
329
|
+
protoOf(WebCryptoDigest).ao7 = function () {
|
|
330
|
+
nonBlocking();
|
|
331
|
+
};
|
|
332
|
+
protoOf(WebCryptoDigest).co7 = function (data) {
|
|
333
|
+
nonBlocking();
|
|
334
|
+
};
|
|
335
|
+
function EcPublicKey(publicKey) {
|
|
336
|
+
WebCryptoEncodableKey.call(this, publicKey, EcPublicKeyProcessor_getInstance());
|
|
337
|
+
this.vob_1 = publicKey;
|
|
338
|
+
}
|
|
339
|
+
function EcPrivateKey_0(privateKey) {
|
|
340
|
+
WebCryptoEncodableKey.call(this, privateKey, EcPrivateKeyProcessor_getInstance());
|
|
341
|
+
this.yob_1 = privateKey;
|
|
342
|
+
}
|
|
343
|
+
function WebCryptoEc$keyPairWrapper$lambda($keyPairWrapper, this$0) {
|
|
344
|
+
return function (it) {
|
|
345
|
+
return $keyPairWrapper(this$0.coc_1.aoc_1(it.publicKey), this$0.doc_1.aoc_1(it.privateKey));
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
function WebCryptoEc(algorithmName, publicKeyWrapper, privateKeyWrapper, keyPairWrapper) {
|
|
349
|
+
this.boc_1 = algorithmName;
|
|
350
|
+
this.coc_1 = publicKeyWrapper;
|
|
351
|
+
this.doc_1 = privateKeyWrapper;
|
|
352
|
+
var tmp = this;
|
|
353
|
+
var tmp0 = this.coc_1.zob_1;
|
|
354
|
+
// Inline function 'kotlin.collections.plus' call
|
|
355
|
+
var elements = this.doc_1.zob_1;
|
|
356
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
357
|
+
tmp.eoc_1 = tmp0.concat(elements);
|
|
358
|
+
var tmp_0 = this;
|
|
359
|
+
tmp_0.foc_1 = WebCryptoEc$keyPairWrapper$lambda(keyPairWrapper, this);
|
|
360
|
+
}
|
|
361
|
+
function EcPublicKeyProcessor() {
|
|
362
|
+
EcPublicKeyProcessor_instance = this;
|
|
363
|
+
WebCryptoKeyProcessor.call(this);
|
|
364
|
+
}
|
|
365
|
+
protoOf(EcPublicKeyProcessor).goc = function (format) {
|
|
366
|
+
var tmp;
|
|
367
|
+
if (equals(format, JWK_getInstance())) {
|
|
368
|
+
tmp = 'jwk';
|
|
369
|
+
} else if (equals(format, Uncompressed_getInstance()) || equals(format, Compressed_getInstance())) {
|
|
370
|
+
tmp = 'raw';
|
|
371
|
+
} else if (equals(format, DER_getInstance()) || equals(format, PEM_getInstance())) {
|
|
372
|
+
tmp = 'spki';
|
|
373
|
+
} else {
|
|
374
|
+
noWhenBranchMatchedException();
|
|
375
|
+
}
|
|
376
|
+
return tmp;
|
|
377
|
+
};
|
|
378
|
+
protoOf(EcPublicKeyProcessor).lob = function (format) {
|
|
379
|
+
return this.goc(format instanceof Format_0 ? format : THROW_CCE());
|
|
380
|
+
};
|
|
381
|
+
protoOf(EcPublicKeyProcessor).hoc = function (algorithm, format, key) {
|
|
382
|
+
var tmp;
|
|
383
|
+
if (equals(format, JWK_getInstance())) {
|
|
384
|
+
tmp = key;
|
|
385
|
+
} else if (equals(format, Uncompressed_getInstance()) || equals(format, Compressed_getInstance())) {
|
|
386
|
+
tmp = key;
|
|
387
|
+
} else if (equals(format, DER_getInstance())) {
|
|
388
|
+
tmp = key;
|
|
389
|
+
} else if (equals(format, PEM_getInstance())) {
|
|
390
|
+
tmp = unwrapPem(Companion_getInstance_10().woa_1, key);
|
|
391
|
+
} else {
|
|
392
|
+
noWhenBranchMatchedException();
|
|
393
|
+
}
|
|
394
|
+
return tmp;
|
|
395
|
+
};
|
|
396
|
+
protoOf(EcPublicKeyProcessor).nob = function (algorithm, format, key) {
|
|
397
|
+
return this.hoc(algorithm, format instanceof Format_0 ? format : THROW_CCE(), key);
|
|
398
|
+
};
|
|
399
|
+
var EcPublicKeyProcessor_instance;
|
|
400
|
+
function EcPublicKeyProcessor_getInstance() {
|
|
401
|
+
if (EcPublicKeyProcessor_instance == null)
|
|
402
|
+
new EcPublicKeyProcessor();
|
|
403
|
+
return EcPublicKeyProcessor_instance;
|
|
404
|
+
}
|
|
405
|
+
function EcPrivateKeyProcessor() {
|
|
406
|
+
EcPrivateKeyProcessor_instance = this;
|
|
407
|
+
WebCryptoKeyProcessor.call(this);
|
|
408
|
+
}
|
|
409
|
+
protoOf(EcPrivateKeyProcessor).ioc = function (format) {
|
|
410
|
+
var tmp;
|
|
411
|
+
if (equals(format, JWK_getInstance_0())) {
|
|
412
|
+
tmp = 'jwk';
|
|
413
|
+
} else if (equals(format, RAW_getInstance()) || equals(format, Generic_getInstance()) || (equals(format, Generic_getInstance_0()) || (equals(format, SEC1_getInstance()) || equals(format, SEC1_getInstance_0())))) {
|
|
414
|
+
tmp = 'pkcs8';
|
|
415
|
+
} else {
|
|
416
|
+
noWhenBranchMatchedException();
|
|
417
|
+
}
|
|
418
|
+
return tmp;
|
|
419
|
+
};
|
|
420
|
+
protoOf(EcPrivateKeyProcessor).lob = function (format) {
|
|
421
|
+
return this.ioc(format instanceof Format_1 ? format : THROW_CCE());
|
|
422
|
+
};
|
|
423
|
+
protoOf(EcPrivateKeyProcessor).joc = function (algorithm, format, key) {
|
|
424
|
+
var tmp;
|
|
425
|
+
if (equals(format, JWK_getInstance_0())) {
|
|
426
|
+
tmp = key;
|
|
427
|
+
} else if (equals(format, RAW_getInstance())) {
|
|
428
|
+
var namedCurve = get_ecKeyAlgorithmNamedCurve(algorithm);
|
|
429
|
+
var tmp_0;
|
|
430
|
+
if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.vo6())) {
|
|
431
|
+
tmp_0 = get_secp256r1(Companion_instance_1);
|
|
432
|
+
} else if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.wo6())) {
|
|
433
|
+
tmp_0 = get_secp384r1(Companion_instance_1);
|
|
434
|
+
} else if (namedCurve === _Curve___get_name__impl__klrusc(Companion_instance.xo6())) {
|
|
435
|
+
tmp_0 = get_secp521r1(Companion_instance_1);
|
|
436
|
+
} else {
|
|
437
|
+
var message = 'Unknown curve: ' + namedCurve;
|
|
438
|
+
throw IllegalStateException_init_$Create$(toString(message));
|
|
439
|
+
}
|
|
440
|
+
var curveId = tmp_0;
|
|
441
|
+
tmp = wrapPrivateKeyInfo(0, new EcKeyAlgorithmIdentifier(_EcParameters___init__impl__i4ww9z(curveId)), Default_getInstance().yt(Companion_instance_2.g63(), new EcPrivateKey(1, key)));
|
|
442
|
+
} else if (equals(format, Generic_getInstance())) {
|
|
443
|
+
tmp = key;
|
|
444
|
+
} else if (equals(format, Generic_getInstance_0())) {
|
|
445
|
+
tmp = unwrapPem(Companion_getInstance_10().xoa_1, key);
|
|
446
|
+
} else if (equals(format, SEC1_getInstance())) {
|
|
447
|
+
tmp = convertEcPrivateKeyFromSec1ToPkcs8(key);
|
|
448
|
+
} else if (equals(format, SEC1_getInstance_0())) {
|
|
449
|
+
tmp = convertEcPrivateKeyFromSec1ToPkcs8(unwrapPem(Companion_getInstance_10().aob_1, key));
|
|
450
|
+
} else {
|
|
451
|
+
noWhenBranchMatchedException();
|
|
452
|
+
}
|
|
453
|
+
return tmp;
|
|
454
|
+
};
|
|
455
|
+
protoOf(EcPrivateKeyProcessor).nob = function (algorithm, format, key) {
|
|
456
|
+
return this.joc(algorithm, format instanceof Format_1 ? format : THROW_CCE(), key);
|
|
457
|
+
};
|
|
458
|
+
var EcPrivateKeyProcessor_instance;
|
|
459
|
+
function EcPrivateKeyProcessor_getInstance() {
|
|
460
|
+
if (EcPrivateKeyProcessor_instance == null)
|
|
461
|
+
new EcPrivateKeyProcessor();
|
|
462
|
+
return EcPrivateKeyProcessor_instance;
|
|
463
|
+
}
|
|
464
|
+
function EcdhKeyPair(publicKey, privateKey) {
|
|
465
|
+
this.koc_1 = publicKey;
|
|
466
|
+
this.loc_1 = privateKey;
|
|
467
|
+
}
|
|
468
|
+
function EcdhPublicKey(publicKey) {
|
|
469
|
+
EcPublicKey.call(this, publicKey);
|
|
470
|
+
}
|
|
471
|
+
function EcdhPrivateKey(privateKey) {
|
|
472
|
+
EcPrivateKey_0.call(this, privateKey);
|
|
473
|
+
}
|
|
474
|
+
function WebCryptoEcdh$EcdhPublicKey$_init_$ref_x8kjxe() {
|
|
475
|
+
var l = function (p0) {
|
|
476
|
+
return new EcdhPublicKey(p0);
|
|
477
|
+
};
|
|
478
|
+
l.callableName = '<init>';
|
|
479
|
+
return l;
|
|
480
|
+
}
|
|
481
|
+
function WebCryptoEcdh$EcdhPrivateKey$_init_$ref_1xgfie() {
|
|
482
|
+
var l = function (p0) {
|
|
483
|
+
return new EcdhPrivateKey(p0);
|
|
484
|
+
};
|
|
485
|
+
l.callableName = '<init>';
|
|
486
|
+
return l;
|
|
487
|
+
}
|
|
488
|
+
function WebCryptoEcdh$EcdhKeyPair$_init_$ref_fqllqz() {
|
|
489
|
+
var l = function (p0, p1) {
|
|
490
|
+
return new EcdhKeyPair(p0, p1);
|
|
491
|
+
};
|
|
492
|
+
l.callableName = '<init>';
|
|
493
|
+
return l;
|
|
494
|
+
}
|
|
495
|
+
function WebCryptoEcdh() {
|
|
496
|
+
WebCryptoEcdh_instance = this;
|
|
497
|
+
// Inline function 'kotlin.arrayOf' call
|
|
498
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
499
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
500
|
+
var tmp = [];
|
|
501
|
+
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoEcdh$EcdhPublicKey$_init_$ref_x8kjxe());
|
|
502
|
+
// Inline function 'kotlin.arrayOf' call
|
|
503
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
504
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
505
|
+
var tmp_1 = ['deriveBits'];
|
|
506
|
+
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoEcdh$EcdhPrivateKey$_init_$ref_1xgfie());
|
|
507
|
+
WebCryptoEc.call(this, 'ECDH', tmp_0, tmp_2, WebCryptoEcdh$EcdhKeyPair$_init_$ref_fqllqz());
|
|
508
|
+
}
|
|
509
|
+
var WebCryptoEcdh_instance;
|
|
510
|
+
function WebCryptoEcdh_getInstance() {
|
|
511
|
+
if (WebCryptoEcdh_instance == null)
|
|
512
|
+
new WebCryptoEcdh();
|
|
513
|
+
return WebCryptoEcdh_instance;
|
|
514
|
+
}
|
|
515
|
+
function EcdsaKeyPair(publicKey, privateKey) {
|
|
516
|
+
this.moc_1 = publicKey;
|
|
517
|
+
this.noc_1 = privateKey;
|
|
518
|
+
}
|
|
519
|
+
function EcdsaPublicKey(publicKey) {
|
|
520
|
+
EcPublicKey.call(this, publicKey);
|
|
521
|
+
}
|
|
522
|
+
function EcdsaPrivateKey(privateKey) {
|
|
523
|
+
EcPrivateKey_0.call(this, privateKey);
|
|
524
|
+
}
|
|
525
|
+
function WebCryptoEcdsa$EcdsaPublicKey$_init_$ref_5egfgi() {
|
|
526
|
+
var l = function (p0) {
|
|
527
|
+
return new EcdsaPublicKey(p0);
|
|
528
|
+
};
|
|
529
|
+
l.callableName = '<init>';
|
|
530
|
+
return l;
|
|
531
|
+
}
|
|
532
|
+
function WebCryptoEcdsa$EcdsaPrivateKey$_init_$ref_8mqrbu() {
|
|
533
|
+
var l = function (p0) {
|
|
534
|
+
return new EcdsaPrivateKey(p0);
|
|
535
|
+
};
|
|
536
|
+
l.callableName = '<init>';
|
|
537
|
+
return l;
|
|
538
|
+
}
|
|
539
|
+
function WebCryptoEcdsa$EcdsaKeyPair$_init_$ref_l5vyez() {
|
|
540
|
+
var l = function (p0, p1) {
|
|
541
|
+
return new EcdsaKeyPair(p0, p1);
|
|
542
|
+
};
|
|
543
|
+
l.callableName = '<init>';
|
|
544
|
+
return l;
|
|
545
|
+
}
|
|
546
|
+
function WebCryptoEcdsa() {
|
|
547
|
+
WebCryptoEcdsa_instance = this;
|
|
548
|
+
// Inline function 'kotlin.arrayOf' call
|
|
549
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
550
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
551
|
+
var tmp = ['verify'];
|
|
552
|
+
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoEcdsa$EcdsaPublicKey$_init_$ref_5egfgi());
|
|
553
|
+
// Inline function 'kotlin.arrayOf' call
|
|
554
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
555
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
556
|
+
var tmp_1 = ['sign'];
|
|
557
|
+
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoEcdsa$EcdsaPrivateKey$_init_$ref_8mqrbu());
|
|
558
|
+
WebCryptoEc.call(this, 'ECDSA', tmp_0, tmp_2, WebCryptoEcdsa$EcdsaKeyPair$_init_$ref_l5vyez());
|
|
559
|
+
}
|
|
560
|
+
var WebCryptoEcdsa_instance;
|
|
561
|
+
function WebCryptoEcdsa_getInstance() {
|
|
562
|
+
if (WebCryptoEcdsa_instance == null)
|
|
563
|
+
new WebCryptoEcdsa();
|
|
564
|
+
return WebCryptoEcdsa_instance;
|
|
565
|
+
}
|
|
566
|
+
function WebCryptoHkdf() {
|
|
567
|
+
}
|
|
568
|
+
var WebCryptoHkdf_instance;
|
|
569
|
+
function WebCryptoHkdf_getInstance() {
|
|
570
|
+
return WebCryptoHkdf_instance;
|
|
571
|
+
}
|
|
572
|
+
function HmacKey(key) {
|
|
573
|
+
WebCryptoEncodableKey.call(this, key, HmacKeyProcessor_getInstance());
|
|
574
|
+
this.qoc_1 = key;
|
|
575
|
+
}
|
|
576
|
+
protoOf(HmacKey).roc = function () {
|
|
577
|
+
return new WebCryptoSignatureGenerator(Algorithm('HMAC'), this.qoc_1);
|
|
578
|
+
};
|
|
579
|
+
function WebCryptoHmac$HmacKey$_init_$ref_enwl2t() {
|
|
580
|
+
var l = function (p0) {
|
|
581
|
+
return new HmacKey(p0);
|
|
582
|
+
};
|
|
583
|
+
l.callableName = '<init>';
|
|
584
|
+
return l;
|
|
585
|
+
}
|
|
586
|
+
function WebCryptoHmac() {
|
|
587
|
+
WebCryptoHmac_instance = this;
|
|
588
|
+
var tmp = this;
|
|
589
|
+
// Inline function 'kotlin.arrayOf' call
|
|
590
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
591
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
592
|
+
var tmp_0 = ['sign', 'verify'];
|
|
593
|
+
tmp.soc_1 = new WebCryptoKeyWrapper(tmp_0, WebCryptoHmac$HmacKey$_init_$ref_enwl2t());
|
|
594
|
+
}
|
|
595
|
+
protoOf(WebCryptoHmac).toc = function (digest) {
|
|
596
|
+
return new WebCryptoKeyDecoder(HmacKeyAlgorithm(hashAlgorithmName(digest), null), HmacKeyProcessor_getInstance(), this.soc_1);
|
|
597
|
+
};
|
|
598
|
+
var WebCryptoHmac_instance;
|
|
599
|
+
function WebCryptoHmac_getInstance() {
|
|
600
|
+
if (WebCryptoHmac_instance == null)
|
|
601
|
+
new WebCryptoHmac();
|
|
602
|
+
return WebCryptoHmac_instance;
|
|
603
|
+
}
|
|
604
|
+
function HmacKeyProcessor() {
|
|
605
|
+
HmacKeyProcessor_instance = this;
|
|
606
|
+
WebCryptoKeyProcessor.call(this);
|
|
607
|
+
}
|
|
608
|
+
protoOf(HmacKeyProcessor).uoc = function (format) {
|
|
609
|
+
var tmp;
|
|
610
|
+
switch (format.a1_1) {
|
|
611
|
+
case 0:
|
|
612
|
+
tmp = 'raw';
|
|
613
|
+
break;
|
|
614
|
+
case 1:
|
|
615
|
+
tmp = 'jwk';
|
|
616
|
+
break;
|
|
617
|
+
default:
|
|
618
|
+
noWhenBranchMatchedException();
|
|
619
|
+
break;
|
|
620
|
+
}
|
|
621
|
+
return tmp;
|
|
622
|
+
};
|
|
623
|
+
protoOf(HmacKeyProcessor).lob = function (format) {
|
|
624
|
+
return this.uoc(format instanceof Format_2 ? format : THROW_CCE());
|
|
625
|
+
};
|
|
626
|
+
protoOf(HmacKeyProcessor).voc = function (algorithm, format, key) {
|
|
627
|
+
return key;
|
|
628
|
+
};
|
|
629
|
+
protoOf(HmacKeyProcessor).nob = function (algorithm, format, key) {
|
|
630
|
+
return this.voc(algorithm, format instanceof Format_2 ? format : THROW_CCE(), key);
|
|
631
|
+
};
|
|
632
|
+
var HmacKeyProcessor_instance;
|
|
633
|
+
function HmacKeyProcessor_getInstance() {
|
|
634
|
+
if (HmacKeyProcessor_instance == null)
|
|
635
|
+
new HmacKeyProcessor();
|
|
636
|
+
return HmacKeyProcessor_instance;
|
|
637
|
+
}
|
|
638
|
+
function WebCryptoPbkdf2() {
|
|
639
|
+
}
|
|
640
|
+
var WebCryptoPbkdf2_instance;
|
|
641
|
+
function WebCryptoPbkdf2_getInstance() {
|
|
642
|
+
return WebCryptoPbkdf2_instance;
|
|
643
|
+
}
|
|
644
|
+
function RsaPublicKey(publicKey) {
|
|
645
|
+
WebCryptoEncodableKey.call(this, publicKey, RsaPublicKeyProcessor_getInstance());
|
|
646
|
+
this.yoc_1 = publicKey;
|
|
647
|
+
}
|
|
648
|
+
function RsaPrivateKey(privateKey) {
|
|
649
|
+
WebCryptoEncodableKey.call(this, privateKey, RsaPrivateKeyProcessor_getInstance());
|
|
650
|
+
this.bod_1 = privateKey;
|
|
651
|
+
}
|
|
652
|
+
function WebCryptoRsa$keyPairWrapper$lambda($keyPairWrapper, this$0) {
|
|
653
|
+
return function (it) {
|
|
654
|
+
return $keyPairWrapper(this$0.dod_1.aoc_1(it.publicKey), this$0.eod_1.aoc_1(it.privateKey));
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
function WebCryptoRsa(algorithmName, publicKeyWrapper, privateKeyWrapper, keyPairWrapper) {
|
|
658
|
+
this.cod_1 = algorithmName;
|
|
659
|
+
this.dod_1 = publicKeyWrapper;
|
|
660
|
+
this.eod_1 = privateKeyWrapper;
|
|
661
|
+
var tmp = this;
|
|
662
|
+
var tmp0 = this.dod_1.zob_1;
|
|
663
|
+
// Inline function 'kotlin.collections.plus' call
|
|
664
|
+
var elements = this.eod_1.zob_1;
|
|
665
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
666
|
+
tmp.fod_1 = tmp0.concat(elements);
|
|
667
|
+
var tmp_0 = this;
|
|
668
|
+
tmp_0.god_1 = WebCryptoRsa$keyPairWrapper$lambda(keyPairWrapper, this);
|
|
669
|
+
}
|
|
670
|
+
function RsaPublicKeyProcessor() {
|
|
671
|
+
RsaPublicKeyProcessor_instance = this;
|
|
672
|
+
WebCryptoKeyProcessor.call(this);
|
|
673
|
+
}
|
|
674
|
+
protoOf(RsaPublicKeyProcessor).hod = function (format) {
|
|
675
|
+
var tmp;
|
|
676
|
+
if (equals(format, JWK_getInstance_1())) {
|
|
677
|
+
tmp = 'jwk';
|
|
678
|
+
} else if (equals(format, Generic_getInstance_1()) || equals(format, Generic_getInstance_2()) || (equals(format, PKCS1_getInstance()) || equals(format, PKCS1_getInstance_0()))) {
|
|
679
|
+
tmp = 'spki';
|
|
680
|
+
} else {
|
|
681
|
+
noWhenBranchMatchedException();
|
|
682
|
+
}
|
|
683
|
+
return tmp;
|
|
684
|
+
};
|
|
685
|
+
protoOf(RsaPublicKeyProcessor).lob = function (format) {
|
|
686
|
+
return this.hod(format instanceof Format_3 ? format : THROW_CCE());
|
|
687
|
+
};
|
|
688
|
+
protoOf(RsaPublicKeyProcessor).iod = function (algorithm, format, key) {
|
|
689
|
+
var tmp;
|
|
690
|
+
if (equals(format, JWK_getInstance_1())) {
|
|
691
|
+
tmp = key;
|
|
692
|
+
} else if (equals(format, Generic_getInstance_1())) {
|
|
693
|
+
tmp = key;
|
|
694
|
+
} else if (equals(format, Generic_getInstance_2())) {
|
|
695
|
+
tmp = unwrapPem(Companion_getInstance_10().woa_1, key);
|
|
696
|
+
} else if (equals(format, PKCS1_getInstance())) {
|
|
697
|
+
tmp = wrapSubjectPublicKeyInfo(RsaKeyAlgorithmIdentifier_instance, key);
|
|
698
|
+
} else if (equals(format, PKCS1_getInstance_0())) {
|
|
699
|
+
tmp = wrapSubjectPublicKeyInfo(RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().yoa_1, key));
|
|
700
|
+
} else {
|
|
701
|
+
noWhenBranchMatchedException();
|
|
702
|
+
}
|
|
703
|
+
return tmp;
|
|
704
|
+
};
|
|
705
|
+
protoOf(RsaPublicKeyProcessor).nob = function (algorithm, format, key) {
|
|
706
|
+
return this.iod(algorithm, format instanceof Format_3 ? format : THROW_CCE(), key);
|
|
707
|
+
};
|
|
708
|
+
var RsaPublicKeyProcessor_instance;
|
|
709
|
+
function RsaPublicKeyProcessor_getInstance() {
|
|
710
|
+
if (RsaPublicKeyProcessor_instance == null)
|
|
711
|
+
new RsaPublicKeyProcessor();
|
|
712
|
+
return RsaPublicKeyProcessor_instance;
|
|
713
|
+
}
|
|
714
|
+
function RsaPrivateKeyProcessor() {
|
|
715
|
+
RsaPrivateKeyProcessor_instance = this;
|
|
716
|
+
WebCryptoKeyProcessor.call(this);
|
|
717
|
+
}
|
|
718
|
+
protoOf(RsaPrivateKeyProcessor).jod = function (format) {
|
|
719
|
+
var tmp;
|
|
720
|
+
if (equals(format, JWK_getInstance_2())) {
|
|
721
|
+
tmp = 'jwk';
|
|
722
|
+
} else if (equals(format, Generic_getInstance_3()) || equals(format, Generic_getInstance_4()) || (equals(format, PKCS1_getInstance_1()) || equals(format, PKCS1_getInstance_2()))) {
|
|
723
|
+
tmp = 'pkcs8';
|
|
724
|
+
} else {
|
|
725
|
+
noWhenBranchMatchedException();
|
|
726
|
+
}
|
|
727
|
+
return tmp;
|
|
728
|
+
};
|
|
729
|
+
protoOf(RsaPrivateKeyProcessor).lob = function (format) {
|
|
730
|
+
return this.jod(format instanceof Format_4 ? format : THROW_CCE());
|
|
731
|
+
};
|
|
732
|
+
protoOf(RsaPrivateKeyProcessor).kod = function (algorithm, format, key) {
|
|
733
|
+
var tmp;
|
|
734
|
+
if (equals(format, JWK_getInstance_2())) {
|
|
735
|
+
tmp = key;
|
|
736
|
+
} else if (equals(format, Generic_getInstance_3())) {
|
|
737
|
+
tmp = key;
|
|
738
|
+
} else if (equals(format, Generic_getInstance_4())) {
|
|
739
|
+
tmp = unwrapPem(Companion_getInstance_10().xoa_1, key);
|
|
740
|
+
} else if (equals(format, PKCS1_getInstance_1())) {
|
|
741
|
+
tmp = wrapPrivateKeyInfo(0, RsaKeyAlgorithmIdentifier_instance, key);
|
|
742
|
+
} else if (equals(format, PKCS1_getInstance_2())) {
|
|
743
|
+
tmp = wrapPrivateKeyInfo(0, RsaKeyAlgorithmIdentifier_instance, unwrapPem(Companion_getInstance_10().zoa_1, key));
|
|
744
|
+
} else {
|
|
745
|
+
noWhenBranchMatchedException();
|
|
746
|
+
}
|
|
747
|
+
return tmp;
|
|
748
|
+
};
|
|
749
|
+
protoOf(RsaPrivateKeyProcessor).nob = function (algorithm, format, key) {
|
|
750
|
+
return this.kod(algorithm, format instanceof Format_4 ? format : THROW_CCE(), key);
|
|
751
|
+
};
|
|
752
|
+
var RsaPrivateKeyProcessor_instance;
|
|
753
|
+
function RsaPrivateKeyProcessor_getInstance() {
|
|
754
|
+
if (RsaPrivateKeyProcessor_instance == null)
|
|
755
|
+
new RsaPrivateKeyProcessor();
|
|
756
|
+
return RsaPrivateKeyProcessor_instance;
|
|
757
|
+
}
|
|
758
|
+
function RsaOaepKeyPair(publicKey, privateKey) {
|
|
759
|
+
this.lod_1 = publicKey;
|
|
760
|
+
this.mod_1 = privateKey;
|
|
761
|
+
}
|
|
762
|
+
function RsaOaepPublicKey(publicKey) {
|
|
763
|
+
RsaPublicKey.call(this, publicKey);
|
|
764
|
+
}
|
|
765
|
+
function RsaOaepPrivateKey(privateKey) {
|
|
766
|
+
RsaPrivateKey.call(this, privateKey);
|
|
767
|
+
}
|
|
768
|
+
function WebCryptoRsaOaep$RsaOaepPublicKey$_init_$ref_2xzkj4() {
|
|
769
|
+
var l = function (p0) {
|
|
770
|
+
return new RsaOaepPublicKey(p0);
|
|
771
|
+
};
|
|
772
|
+
l.callableName = '<init>';
|
|
773
|
+
return l;
|
|
774
|
+
}
|
|
775
|
+
function WebCryptoRsaOaep$RsaOaepPrivateKey$_init_$ref_ds5c3s() {
|
|
776
|
+
var l = function (p0) {
|
|
777
|
+
return new RsaOaepPrivateKey(p0);
|
|
778
|
+
};
|
|
779
|
+
l.callableName = '<init>';
|
|
780
|
+
return l;
|
|
781
|
+
}
|
|
782
|
+
function WebCryptoRsaOaep$RsaOaepKeyPair$_init_$ref_whtofn() {
|
|
783
|
+
var l = function (p0, p1) {
|
|
784
|
+
return new RsaOaepKeyPair(p0, p1);
|
|
785
|
+
};
|
|
786
|
+
l.callableName = '<init>';
|
|
787
|
+
return l;
|
|
788
|
+
}
|
|
789
|
+
function WebCryptoRsaOaep() {
|
|
790
|
+
WebCryptoRsaOaep_instance = this;
|
|
791
|
+
// Inline function 'kotlin.arrayOf' call
|
|
792
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
793
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
794
|
+
var tmp = ['encrypt'];
|
|
795
|
+
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoRsaOaep$RsaOaepPublicKey$_init_$ref_2xzkj4());
|
|
796
|
+
// Inline function 'kotlin.arrayOf' call
|
|
797
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
798
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
799
|
+
var tmp_1 = ['decrypt'];
|
|
800
|
+
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoRsaOaep$RsaOaepPrivateKey$_init_$ref_ds5c3s());
|
|
801
|
+
WebCryptoRsa.call(this, 'RSA-OAEP', tmp_0, tmp_2, WebCryptoRsaOaep$RsaOaepKeyPair$_init_$ref_whtofn());
|
|
802
|
+
}
|
|
803
|
+
var WebCryptoRsaOaep_instance;
|
|
804
|
+
function WebCryptoRsaOaep_getInstance() {
|
|
805
|
+
if (WebCryptoRsaOaep_instance == null)
|
|
806
|
+
new WebCryptoRsaOaep();
|
|
807
|
+
return WebCryptoRsaOaep_instance;
|
|
808
|
+
}
|
|
809
|
+
function RsaPkcs1KeyPair(publicKey, privateKey) {
|
|
810
|
+
this.nod_1 = publicKey;
|
|
811
|
+
this.ood_1 = privateKey;
|
|
812
|
+
}
|
|
813
|
+
function RsaPkcs1PublicKey(publicKey) {
|
|
814
|
+
RsaPublicKey.call(this, publicKey);
|
|
815
|
+
}
|
|
816
|
+
function RsaPkcs1PrivateKey(privateKey) {
|
|
817
|
+
RsaPrivateKey.call(this, privateKey);
|
|
818
|
+
}
|
|
819
|
+
function WebCryptoRsaPkcs1$RsaPkcs1PublicKey$_init_$ref_kiwvhe() {
|
|
820
|
+
var l = function (p0) {
|
|
821
|
+
return new RsaPkcs1PublicKey(p0);
|
|
822
|
+
};
|
|
823
|
+
l.callableName = '<init>';
|
|
824
|
+
return l;
|
|
825
|
+
}
|
|
826
|
+
function WebCryptoRsaPkcs1$RsaPkcs1PrivateKey$_init_$ref_y0qpl2() {
|
|
827
|
+
var l = function (p0) {
|
|
828
|
+
return new RsaPkcs1PrivateKey(p0);
|
|
829
|
+
};
|
|
830
|
+
l.callableName = '<init>';
|
|
831
|
+
return l;
|
|
832
|
+
}
|
|
833
|
+
function WebCryptoRsaPkcs1$RsaPkcs1KeyPair$_init_$ref_s062w5() {
|
|
834
|
+
var l = function (p0, p1) {
|
|
835
|
+
return new RsaPkcs1KeyPair(p0, p1);
|
|
836
|
+
};
|
|
837
|
+
l.callableName = '<init>';
|
|
838
|
+
return l;
|
|
839
|
+
}
|
|
840
|
+
function WebCryptoRsaPkcs1() {
|
|
841
|
+
WebCryptoRsaPkcs1_instance = this;
|
|
842
|
+
// Inline function 'kotlin.arrayOf' call
|
|
843
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
844
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
845
|
+
var tmp = ['verify'];
|
|
846
|
+
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoRsaPkcs1$RsaPkcs1PublicKey$_init_$ref_kiwvhe());
|
|
847
|
+
// Inline function 'kotlin.arrayOf' call
|
|
848
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
849
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
850
|
+
var tmp_1 = ['sign'];
|
|
851
|
+
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoRsaPkcs1$RsaPkcs1PrivateKey$_init_$ref_y0qpl2());
|
|
852
|
+
WebCryptoRsa.call(this, 'RSASSA-PKCS1-v1_5', tmp_0, tmp_2, WebCryptoRsaPkcs1$RsaPkcs1KeyPair$_init_$ref_s062w5());
|
|
853
|
+
}
|
|
854
|
+
var WebCryptoRsaPkcs1_instance;
|
|
855
|
+
function WebCryptoRsaPkcs1_getInstance() {
|
|
856
|
+
if (WebCryptoRsaPkcs1_instance == null)
|
|
857
|
+
new WebCryptoRsaPkcs1();
|
|
858
|
+
return WebCryptoRsaPkcs1_instance;
|
|
859
|
+
}
|
|
860
|
+
function RsaPssKeyPair(publicKey, privateKey) {
|
|
861
|
+
this.pod_1 = publicKey;
|
|
862
|
+
this.qod_1 = privateKey;
|
|
863
|
+
}
|
|
864
|
+
function RsaPssPublicKey(publicKey) {
|
|
865
|
+
RsaPublicKey.call(this, publicKey);
|
|
866
|
+
}
|
|
867
|
+
function RsaPssPrivateKey(privateKey) {
|
|
868
|
+
RsaPrivateKey.call(this, privateKey);
|
|
869
|
+
}
|
|
870
|
+
function WebCryptoRsaPss$RsaPssPublicKey$_init_$ref_o813fm() {
|
|
871
|
+
var l = function (p0) {
|
|
872
|
+
return new RsaPssPublicKey(p0);
|
|
873
|
+
};
|
|
874
|
+
l.callableName = '<init>';
|
|
875
|
+
return l;
|
|
876
|
+
}
|
|
877
|
+
function WebCryptoRsaPss$RsaPssPrivateKey$_init_$ref_6l5g3q() {
|
|
878
|
+
var l = function (p0) {
|
|
879
|
+
return new RsaPssPrivateKey(p0);
|
|
880
|
+
};
|
|
881
|
+
l.callableName = '<init>';
|
|
882
|
+
return l;
|
|
883
|
+
}
|
|
884
|
+
function WebCryptoRsaPss$RsaPssKeyPair$_init_$ref_3h8asb() {
|
|
885
|
+
var l = function (p0, p1) {
|
|
886
|
+
return new RsaPssKeyPair(p0, p1);
|
|
887
|
+
};
|
|
888
|
+
l.callableName = '<init>';
|
|
889
|
+
return l;
|
|
890
|
+
}
|
|
891
|
+
function WebCryptoRsaPss() {
|
|
892
|
+
WebCryptoRsaPss_instance = this;
|
|
893
|
+
// Inline function 'kotlin.arrayOf' call
|
|
894
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
895
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
896
|
+
var tmp = ['verify'];
|
|
897
|
+
var tmp_0 = new WebCryptoKeyWrapper(tmp, WebCryptoRsaPss$RsaPssPublicKey$_init_$ref_o813fm());
|
|
898
|
+
// Inline function 'kotlin.arrayOf' call
|
|
899
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
900
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
901
|
+
var tmp_1 = ['sign'];
|
|
902
|
+
var tmp_2 = new WebCryptoKeyWrapper(tmp_1, WebCryptoRsaPss$RsaPssPrivateKey$_init_$ref_6l5g3q());
|
|
903
|
+
WebCryptoRsa.call(this, 'RSA-PSS', tmp_0, tmp_2, WebCryptoRsaPss$RsaPssKeyPair$_init_$ref_3h8asb());
|
|
904
|
+
}
|
|
905
|
+
var WebCryptoRsaPss_instance;
|
|
906
|
+
function WebCryptoRsaPss_getInstance() {
|
|
907
|
+
if (WebCryptoRsaPss_instance == null)
|
|
908
|
+
new WebCryptoRsaPss();
|
|
909
|
+
return WebCryptoRsaPss_instance;
|
|
910
|
+
}
|
|
911
|
+
function hashAlgorithmName(_this__u8e3s4) {
|
|
912
|
+
var tmp;
|
|
913
|
+
if (equals(_this__u8e3s4, SHA1_getInstance())) {
|
|
914
|
+
tmp = 'SHA-1';
|
|
915
|
+
} else if (equals(_this__u8e3s4, SHA256_getInstance())) {
|
|
916
|
+
tmp = 'SHA-256';
|
|
917
|
+
} else if (equals(_this__u8e3s4, SHA384_getInstance())) {
|
|
918
|
+
tmp = 'SHA-384';
|
|
919
|
+
} else if (equals(_this__u8e3s4, SHA512_getInstance())) {
|
|
920
|
+
tmp = 'SHA-512';
|
|
921
|
+
} else {
|
|
922
|
+
throw IllegalStateException_init_$Create$('Unsupported hash algorithm: ' + _this__u8e3s4.go6_1);
|
|
923
|
+
}
|
|
924
|
+
return tmp;
|
|
925
|
+
}
|
|
926
|
+
function nonBlocking() {
|
|
927
|
+
throw IllegalStateException_init_$Create$('Only non-blocking(suspend) calls are supported in WebCrypto');
|
|
928
|
+
}
|
|
929
|
+
function WebCryptoEncodableKey(key, keyProcessor) {
|
|
930
|
+
this.rod_1 = key;
|
|
931
|
+
this.sod_1 = keyProcessor;
|
|
932
|
+
}
|
|
933
|
+
function $decodeFromByteArrayCOROUTINE$(_this__u8e3s4, format, bytes, resultContinuation) {
|
|
934
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
935
|
+
this.boe_1 = _this__u8e3s4;
|
|
936
|
+
this.coe_1 = format;
|
|
937
|
+
this.doe_1 = bytes;
|
|
938
|
+
}
|
|
939
|
+
protoOf($decodeFromByteArrayCOROUTINE$).q9 = function () {
|
|
940
|
+
var suspendResult = this.k9_1;
|
|
941
|
+
$sm: do
|
|
942
|
+
try {
|
|
943
|
+
var tmp = this.i9_1;
|
|
944
|
+
switch (tmp) {
|
|
945
|
+
case 0:
|
|
946
|
+
this.j9_1 = 2;
|
|
947
|
+
this.eoe_1 = this.boe_1.hoe_1.aoc_1;
|
|
948
|
+
this.i9_1 = 1;
|
|
949
|
+
suspendResult = WebCrypto_getInstance().ioe(this.boe_1.goe_1.lob(this.coe_1), this.boe_1.goe_1.nob(this.boe_1.foe_1, this.coe_1, this.doe_1), this.boe_1.foe_1, true, this.boe_1.hoe_1.zob_1, this);
|
|
950
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
951
|
+
return suspendResult;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
continue $sm;
|
|
955
|
+
case 1:
|
|
956
|
+
var ARGUMENT = suspendResult;
|
|
957
|
+
return this.eoe_1(ARGUMENT);
|
|
958
|
+
case 2:
|
|
959
|
+
throw this.l9_1;
|
|
960
|
+
}
|
|
961
|
+
} catch ($p) {
|
|
962
|
+
var e = $p;
|
|
963
|
+
if (this.j9_1 === 2) {
|
|
964
|
+
throw e;
|
|
965
|
+
} else {
|
|
966
|
+
this.i9_1 = this.j9_1;
|
|
967
|
+
this.l9_1 = e;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
while (true);
|
|
971
|
+
};
|
|
972
|
+
function WebCryptoKeyDecoder(algorithm, keyProcessor, keyWrapper) {
|
|
973
|
+
this.foe_1 = algorithm;
|
|
974
|
+
this.goe_1 = keyProcessor;
|
|
975
|
+
this.hoe_1 = keyWrapper;
|
|
976
|
+
}
|
|
977
|
+
protoOf(WebCryptoKeyDecoder).yo6 = function (format, bytes, $completion) {
|
|
978
|
+
var tmp = new $decodeFromByteArrayCOROUTINE$(this, format, bytes, $completion);
|
|
979
|
+
tmp.k9_1 = Unit_instance;
|
|
980
|
+
tmp.l9_1 = null;
|
|
981
|
+
return tmp.q9();
|
|
982
|
+
};
|
|
983
|
+
protoOf(WebCryptoKeyDecoder).zo6 = function (format, bytes) {
|
|
984
|
+
nonBlocking();
|
|
985
|
+
};
|
|
986
|
+
function WebCryptoKeyProcessor() {
|
|
987
|
+
}
|
|
988
|
+
function WebCryptoKeyWrapper(usages, wrap) {
|
|
989
|
+
this.zob_1 = usages;
|
|
990
|
+
this.aoc_1 = wrap;
|
|
991
|
+
}
|
|
992
|
+
function WebCryptoSignatureGenerator(algorithm, key) {
|
|
993
|
+
this.joe_1 = algorithm;
|
|
994
|
+
this.koe_1 = key;
|
|
995
|
+
}
|
|
996
|
+
protoOf(WebCryptoSignatureGenerator).go7 = function (data, $completion) {
|
|
997
|
+
return WebCrypto_getInstance().loe(this.joe_1, this.koe_1, data, $completion);
|
|
998
|
+
};
|
|
999
|
+
protoOf(WebCryptoSignatureGenerator).fo7 = function () {
|
|
1000
|
+
nonBlocking();
|
|
1001
|
+
};
|
|
1002
|
+
protoOf(WebCryptoSignatureGenerator).ho7 = function (data) {
|
|
1003
|
+
nonBlocking();
|
|
1004
|
+
};
|
|
1005
|
+
function get_initHook() {
|
|
1006
|
+
return initHook_0;
|
|
1007
|
+
}
|
|
1008
|
+
var initHook_0;
|
|
1009
|
+
function initHook$init$() {
|
|
1010
|
+
CryptographySystem_getInstance().so6(get_defaultProvider(), 100);
|
|
1011
|
+
return Unit_instance;
|
|
1012
|
+
}
|
|
1013
|
+
function get_ecKeyAlgorithmNamedCurve(_this__u8e3s4) {
|
|
1014
|
+
return ecKeyAlgorithmNamedCurve(_this__u8e3s4);
|
|
1015
|
+
}
|
|
1016
|
+
function Algorithm(name) {
|
|
1017
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1018
|
+
return {name: name};
|
|
1019
|
+
}
|
|
1020
|
+
function HmacKeyAlgorithm(hash, length) {
|
|
1021
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1022
|
+
return length == null ? {name: 'HMAC', hash: hash} : {name: 'HMAC', hash: hash, length: length};
|
|
1023
|
+
}
|
|
1024
|
+
function ecKeyAlgorithmNamedCurve(algorithm) {
|
|
1025
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1026
|
+
return algorithm.namedCurve;
|
|
1027
|
+
}
|
|
1028
|
+
function getSubtleCrypto() {
|
|
1029
|
+
var tmp0_safe_receiver = getCrypto();
|
|
1030
|
+
var tmp0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.subtle;
|
|
1031
|
+
var tmp$ret$1;
|
|
1032
|
+
$l$block: {
|
|
1033
|
+
// Inline function 'kotlin.requireNotNull' call
|
|
1034
|
+
if (tmp0 == null) {
|
|
1035
|
+
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';
|
|
1036
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1037
|
+
} else {
|
|
1038
|
+
tmp$ret$1 = tmp0;
|
|
1039
|
+
break $l$block;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
return tmp$ret$1;
|
|
1043
|
+
}
|
|
1044
|
+
function getCrypto() {
|
|
1045
|
+
return globalThis ? globalThis.crypto : window.crypto || window.msCrypto;
|
|
1046
|
+
}
|
|
1047
|
+
function $digestCOROUTINE$(_this__u8e3s4, algorithmName, data, resultContinuation) {
|
|
1048
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1049
|
+
this.uoe_1 = _this__u8e3s4;
|
|
1050
|
+
this.voe_1 = algorithmName;
|
|
1051
|
+
this.woe_1 = data;
|
|
1052
|
+
}
|
|
1053
|
+
protoOf($digestCOROUTINE$).q9 = function () {
|
|
1054
|
+
var suspendResult = this.k9_1;
|
|
1055
|
+
$sm: do
|
|
1056
|
+
try {
|
|
1057
|
+
var tmp = this.i9_1;
|
|
1058
|
+
switch (tmp) {
|
|
1059
|
+
case 0:
|
|
1060
|
+
this.j9_1 = 2;
|
|
1061
|
+
this.i9_1 = 1;
|
|
1062
|
+
suspendResult = await_0(this.uoe_1.rob_1.digest(this.voe_1, this.woe_1), this);
|
|
1063
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1064
|
+
return suspendResult;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
continue $sm;
|
|
1068
|
+
case 1:
|
|
1069
|
+
var ARGUMENT = suspendResult;
|
|
1070
|
+
return toByteArray(ARGUMENT);
|
|
1071
|
+
case 2:
|
|
1072
|
+
throw this.l9_1;
|
|
1073
|
+
}
|
|
1074
|
+
} catch ($p) {
|
|
1075
|
+
var e = $p;
|
|
1076
|
+
if (this.j9_1 === 2) {
|
|
1077
|
+
throw e;
|
|
1078
|
+
} else {
|
|
1079
|
+
this.i9_1 = this.j9_1;
|
|
1080
|
+
this.l9_1 = e;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
while (true);
|
|
1084
|
+
};
|
|
1085
|
+
function $signCOROUTINE$(_this__u8e3s4, algorithm, key, data, resultContinuation) {
|
|
1086
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1087
|
+
this.fof_1 = _this__u8e3s4;
|
|
1088
|
+
this.gof_1 = algorithm;
|
|
1089
|
+
this.hof_1 = key;
|
|
1090
|
+
this.iof_1 = data;
|
|
1091
|
+
}
|
|
1092
|
+
protoOf($signCOROUTINE$).q9 = function () {
|
|
1093
|
+
var suspendResult = this.k9_1;
|
|
1094
|
+
$sm: do
|
|
1095
|
+
try {
|
|
1096
|
+
var tmp = this.i9_1;
|
|
1097
|
+
switch (tmp) {
|
|
1098
|
+
case 0:
|
|
1099
|
+
this.j9_1 = 2;
|
|
1100
|
+
this.i9_1 = 1;
|
|
1101
|
+
suspendResult = await_0(this.fof_1.rob_1.sign(this.gof_1, this.hof_1, this.iof_1), this);
|
|
1102
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1103
|
+
return suspendResult;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
continue $sm;
|
|
1107
|
+
case 1:
|
|
1108
|
+
var ARGUMENT = suspendResult;
|
|
1109
|
+
return toByteArray(ARGUMENT);
|
|
1110
|
+
case 2:
|
|
1111
|
+
throw this.l9_1;
|
|
1112
|
+
}
|
|
1113
|
+
} catch ($p) {
|
|
1114
|
+
var e = $p;
|
|
1115
|
+
if (this.j9_1 === 2) {
|
|
1116
|
+
throw e;
|
|
1117
|
+
} else {
|
|
1118
|
+
this.i9_1 = this.j9_1;
|
|
1119
|
+
this.l9_1 = e;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
while (true);
|
|
1123
|
+
};
|
|
1124
|
+
function WebCrypto() {
|
|
1125
|
+
WebCrypto_instance = this;
|
|
1126
|
+
this.rob_1 = getSubtleCrypto();
|
|
1127
|
+
}
|
|
1128
|
+
protoOf(WebCrypto).sob = function (algorithmName, data, $completion) {
|
|
1129
|
+
var tmp = new $digestCOROUTINE$(this, algorithmName, data, $completion);
|
|
1130
|
+
tmp.k9_1 = Unit_instance;
|
|
1131
|
+
tmp.l9_1 = null;
|
|
1132
|
+
return tmp.q9();
|
|
1133
|
+
};
|
|
1134
|
+
protoOf(WebCrypto).loe = function (algorithm, key, data, $completion) {
|
|
1135
|
+
var tmp = new $signCOROUTINE$(this, algorithm, key, data, $completion);
|
|
1136
|
+
tmp.k9_1 = Unit_instance;
|
|
1137
|
+
tmp.l9_1 = null;
|
|
1138
|
+
return tmp.q9();
|
|
1139
|
+
};
|
|
1140
|
+
protoOf(WebCrypto).ioe = function (format, keyData, algorithm, extractable, keyUsages, $completion) {
|
|
1141
|
+
var key = format === 'jwk' ? JSON.parse(decodeToString(keyData)) : keyData;
|
|
1142
|
+
return await_0(this.rob_1.importKey(format, key, algorithm, extractable, keyUsages), $completion);
|
|
1143
|
+
};
|
|
1144
|
+
var WebCrypto_instance;
|
|
1145
|
+
function WebCrypto_getInstance() {
|
|
1146
|
+
if (WebCrypto_instance == null)
|
|
1147
|
+
new WebCrypto();
|
|
1148
|
+
return WebCrypto_instance;
|
|
1149
|
+
}
|
|
1150
|
+
function toByteArray(_this__u8e3s4) {
|
|
1151
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1152
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1153
|
+
return new Int8Array(_this__u8e3s4);
|
|
1154
|
+
}
|
|
1155
|
+
function await_0(_this__u8e3s4, $completion) {
|
|
1156
|
+
var safe = SafeContinuation_init_$Create$(intercepted($completion));
|
|
1157
|
+
var tmp = await$lambda(safe);
|
|
1158
|
+
_this__u8e3s4.then(tmp, await$lambda_0(safe));
|
|
1159
|
+
return safe.aa();
|
|
1160
|
+
}
|
|
1161
|
+
function await$lambda($continuation) {
|
|
1162
|
+
return function (it) {
|
|
1163
|
+
// Inline function 'kotlin.coroutines.resume' call
|
|
1164
|
+
var this_0 = $continuation;
|
|
1165
|
+
// Inline function 'kotlin.Companion.success' call
|
|
1166
|
+
var tmp$ret$0 = _Result___init__impl__xyqfz8(it);
|
|
1167
|
+
this_0.t9(tmp$ret$0);
|
|
1168
|
+
return null;
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
function await$lambda_0($continuation) {
|
|
1172
|
+
return function (it) {
|
|
1173
|
+
// Inline function 'kotlin.coroutines.resumeWithException' call
|
|
1174
|
+
var this_0 = $continuation;
|
|
1175
|
+
// Inline function 'kotlin.Companion.failure' call
|
|
1176
|
+
var tmp$ret$0 = _Result___init__impl__xyqfz8(createFailure(it));
|
|
1177
|
+
this_0.t9(tmp$ret$0);
|
|
1178
|
+
return null;
|
|
1179
|
+
};
|
|
1180
|
+
}
|
|
1181
|
+
//region block: init
|
|
1182
|
+
WebCryptoHkdf_instance = new WebCryptoHkdf();
|
|
1183
|
+
WebCryptoPbkdf2_instance = new WebCryptoPbkdf2();
|
|
1184
|
+
//endregion
|
|
1185
|
+
//region block: eager init
|
|
1186
|
+
initHook_0 = initHook$init$();
|
|
1187
|
+
//endregion
|
|
1188
|
+
//region block: exports
|
|
1189
|
+
var initHook = {get: get_initHook};
|
|
1190
|
+
export {
|
|
1191
|
+
initHook as initHook,
|
|
1192
|
+
};
|
|
1193
|
+
//endregion
|
|
1194
|
+
|
|
1195
|
+
//# sourceMappingURL=cryptography-kotlin-cryptography-provider-webcrypto.mjs.map
|