@sphereon/idk-lib-did-methods-web 0.25.0-SNAPSHOT-build-8529934

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.
@@ -0,0 +1,4157 @@
1
+ import {
2
+ toString1pkumu07cwy4m as toString,
3
+ IllegalStateException_init_$Create$1h4bcfod21ri0 as IllegalStateException_init_$Create$,
4
+ Unit_instancev9v8hjid95df as Unit_instance,
5
+ protoOf180f3jzyo7rfj as protoOf,
6
+ VOID3gxj6tk5isa35 as VOID,
7
+ initMetadataForObject1cxne3s9w65el as initMetadataForObject,
8
+ initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
9
+ initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
10
+ IllegalArgumentException_init_$Create$i4126l9nkbuo as IllegalArgumentException_init_$Create$,
11
+ initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
12
+ CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
13
+ get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
14
+ THROW_CCE2g6jy02ryeudk as THROW_CCE,
15
+ isInterface3d6p8outrmvmk as isInterface,
16
+ initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
17
+ await2s6xyuld384ut as await_0,
18
+ promisify1z0ncraq1ipzh as promisify,
19
+ defineProp3ur6h3slcvq4x as defineProp,
20
+ equals2au1ep9vhcato as equals,
21
+ FunctionAdapter3lcrrz3moet5b as FunctionAdapter,
22
+ Comparator2b3maoeh98xtg as Comparator,
23
+ hashCodeq5arwsb9dgti as hashCode,
24
+ compareValues1n2ayl87ihzfk as compareValues,
25
+ sortedWith2csnbbb21k0lg as sortedWith,
26
+ collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
27
+ mapCapacity1h45rc3eh9p2l as mapCapacity,
28
+ coerceAtLeast2bkz8m9ik7hep as coerceAtLeast,
29
+ LinkedHashMap_init_$Create$1gzy1x4a46gd4 as LinkedHashMap_init_$Create$,
30
+ toMutableMapr5f3w62lv8sk as toMutableMap,
31
+ first28gmhyvs4kf06 as first,
32
+ copyToArray2j022khrow2yi as copyToArray,
33
+ joinToStringxqcavsxcmh4q as joinToString,
34
+ contains1tccixv8iwdcq as contains,
35
+ toString30pk9tzaqopn as toString_0,
36
+ KProperty1ca4yb4wlo496 as KProperty1,
37
+ getPropertyCallableRef3hckxc0xueiaj as getPropertyCallableRef,
38
+ lazy2hsh8ze7j6ikd as lazy,
39
+ IllegalArgumentException2asla15b5jaob as IllegalArgumentException,
40
+ LinkedHashMap_init_$Create$2tibire69n089 as LinkedHashMap_init_$Create$_0,
41
+ ArrayList_init_$Create$2byt5m5yn22yy as ArrayList_init_$Create$,
42
+ } from '../kotlin-kotlin-stdlib.mjs';
43
+ import {
44
+ CoseJoseKeyMappingService_instance1u2hjnjtsd7r1 as CoseJoseKeyMappingService_instance,
45
+ JwaKeyType_EC_getInstancesy663o3quhf3 as JwaKeyType_EC_getInstance,
46
+ Companion_getInstance2j5z70v28sfbd as Companion_getInstance,
47
+ P_256_getInstance2c3yye4qdxi9a as P_256_getInstance,
48
+ EcdhUtils_instancem1f6p6z4er02 as EcdhUtils_instance,
49
+ ResolvePublicKeyArgs18wcr8ckibo4x as ResolvePublicKeyArgs,
50
+ PKIException2q8eyrx46yxje as PKIException,
51
+ ResolvedKeyInfoTypee7maap38fdff as ResolvedKeyInfoType,
52
+ GenerateKeyArgs3exal8cx1h1iv as GenerateKeyArgs,
53
+ generateKeyAsync$virtualSuspendBridgea5kvtvcvqjgo as generateKeyAsync$virtualSuspendBridge,
54
+ CreateRawSignatureArgsj4ekfuix1k42 as CreateRawSignatureArgs,
55
+ IdentifierMethod_x5c_getInstance37h0jruk9ae35 as IdentifierMethod_x5c_getInstance,
56
+ VerifyRawSignatureArgs18ql14s7cjsl7 as VerifyRawSignatureArgs,
57
+ EncryptArgs3nscqgzjci3t0 as EncryptArgs,
58
+ encrypt$virtualSuspendBridge2fzt5s4nxtydk as encrypt$virtualSuspendBridge,
59
+ EncryptionResult2kafqhrbwv0ks as EncryptionResult,
60
+ DecryptArgs2okdcyh5j1xm3 as DecryptArgs,
61
+ decrypt$virtualSuspendBridge26lx0sxvy72pq as decrypt$virtualSuspendBridge,
62
+ WrapKeyArgs1o2nu2n8hiij6 as WrapKeyArgs,
63
+ wrapKey$virtualSuspendBridgehuom2lnmrxig as wrapKey$virtualSuspendBridge,
64
+ UnwrapKeyArgs1l29bkkp4d04y as UnwrapKeyArgs,
65
+ unwrapKey$virtualSuspendBridge10diszgquw2jd as unwrapKey$virtualSuspendBridge,
66
+ PerformKeyAgreementArgs2cy1svd0b0maa as PerformKeyAgreementArgs,
67
+ StoreKeyArgs2x4xpugiswbue as StoreKeyArgs,
68
+ storeKey$virtualSuspendBridge2ur76bvwv5849 as storeKey$virtualSuspendBridge,
69
+ ListKeysArgsx5y8zk7xx666 as ListKeysArgs,
70
+ listKeys$virtualSuspendBridgeogq2mk63x0vn as listKeys$virtualSuspendBridge,
71
+ GetKeyArgs3d3w36dy5oz41 as GetKeyArgs,
72
+ getKey$virtualSuspendBridge38ippv9eib6zv as getKey$virtualSuspendBridge,
73
+ DeleteKeyArgskxnuaox68awq as DeleteKeyArgs,
74
+ deleteKey$virtualSuspendBridge2clie97ix3t7p as deleteKey$virtualSuspendBridge,
75
+ getProviderById3cbs00g78z86z as getProviderById,
76
+ getProvider15nv6e6uoyvqk as getProvider,
77
+ registerProvidergldbgky7fryv as registerProvider,
78
+ getResolverById3o3u01y9o8j73 as getResolverById,
79
+ getResolverByKeyTypeOrIdentifieruxmy70pl5k7u as getResolverByKeyTypeOrIdentifier,
80
+ registerResolver26by0isjei20a as registerResolver,
81
+ QueryProviderArgs1qpobauc9f2xe as QueryProviderArgs,
82
+ QueryProvidersArgs2o8p6qm1z6ajs as QueryProvidersArgs,
83
+ GetAllCapabilitiesArgsvl5sannhkhj8 as GetAllCapabilitiesArgs,
84
+ getAllCapabilities$default2my8ewhe78lnc as getAllCapabilities$default,
85
+ resolvePublicKey$default1s9xtr3v06wzo as resolvePublicKey$default,
86
+ generateKey$default1qhxgz7gl19w4 as generateKey$default,
87
+ generateKeyAsync$default2tvn0ng0q0x5u as generateKeyAsync$default,
88
+ encrypt$default5d1j5wmpk5ac as encrypt$default,
89
+ decrypt$default2tg5snelob84g as decrypt$default,
90
+ performKeyAgreement$default3kjax4b11qhz1 as performKeyAgreement$default,
91
+ storeKey$default3hyedu7uwb2q as storeKey$default,
92
+ listKeys$virtualSuspendBridge3om318qdf1ayn as listKeys$virtualSuspendBridge_0,
93
+ createRawSignatureResult$defaultd77zhembl951 as createRawSignatureResult$default,
94
+ encryptResult$default1hbyrnrb2tnze as encryptResult$default,
95
+ decryptResult$default2xvx5e6kgoqpi as decryptResult$default,
96
+ performKeyAgreementResult$default1zk3om63b7aeh as performKeyAgreementResult$default,
97
+ generateKeyResult$default3jhigo88uholy as generateKeyResult$default,
98
+ listKeysResult$default3rniwb27pmy11 as listKeysResult$default,
99
+ storeKeyResult$default3cq4wzefnn46l as storeKeyResult$default,
100
+ resolvePublicKeyResult$default1xzdkdrhpdxr1 as resolvePublicKeyResult$default,
101
+ exposesPrivateKeysForSigning2dtrk591mvf2q as exposesPrivateKeysForSigning,
102
+ KeyManagerService1jy2oalnbllzs as KeyManagerService,
103
+ KeyResolverRegistry6pjvs5ngvu1l as KeyResolverRegistry,
104
+ KmsProviderRegistry37cfrhx8iscz8 as KmsProviderRegistry,
105
+ KeyStoreServiceyjttfrvun5jq as KeyStoreService,
106
+ Companion_instanceg7awlm0z4331 as Companion_instance,
107
+ Companion_instance32pwcnmcyatxm as Companion_instance_0,
108
+ PredefinedKeyStoreTypes_MEMORY_getInstance23f58aplzn8ww as PredefinedKeyStoreTypes_MEMORY_getInstance,
109
+ Companion_getInstance12wp5sqa9plkt as Companion_getInstance_0,
110
+ toKeyReference1hbuu4zgrnbfp as toKeyReference,
111
+ KeyVisibility_PUBLIC_getInstancexko9xei8c785 as KeyVisibility_PUBLIC_getInstance,
112
+ KeyVisibility_PRIVATE_getInstance3vqkhhiu4wt1g as KeyVisibility_PRIVATE_getInstance,
113
+ ManagedKeyInfo2yqhf0w110ugh as ManagedKeyInfo,
114
+ storeCertificateChain$default11apxigx30bm7 as storeCertificateChain$default,
115
+ get_order2qb9qo6aibruu as get_order,
116
+ get_enabled1p6jc410a0fyv as get_enabled,
117
+ listKeys19wgim0aszum0 as listKeys,
118
+ listKeysFiltered2tyqsqt30ik0b as listKeysFiltered,
119
+ KeyStore3o40bf3gbe8w9 as KeyStore,
120
+ X509VerifyPlatformCallback3rbl32vhepoz7 as X509VerifyPlatformCallback,
121
+ X509VerifyService1ji3rocew3bty as X509VerifyService,
122
+ HasPlatformCallback1ytgk8bbzqatz as HasPlatformCallback,
123
+ } from './idk-lib-crypto-core-public.mjs';
124
+ import {
125
+ _Result___get_error__impl__ihqhun2yewd2st3zd9i as _Result___get_error__impl__ihqhun,
126
+ _Result___get_value__impl__bjfvqg3pdjhj1ntjbaj as _Result___get_value__impl__bjfvqg,
127
+ _Result___get_isOk__impl__qbhaup1tqxnca0qn7sa as _Result___get_isOk__impl__qbhaup,
128
+ } from '../kotlin-result-kotlin-result.mjs';
129
+ import {
130
+ Companion_instance27w1uk4n2zibh as Companion_instance_1,
131
+ asErrorResult2t61x2oy4870d as asErrorResult,
132
+ NotFoundException1nc2pz9vpeyq7 as NotFoundException,
133
+ } from './idk-lib-core-api-public.mjs';
134
+ import { Companion_getInstance1cart96rrvhbk as Companion_getInstance_1 } from '../metro-runtime-js.mjs';
135
+ import { awaitd1m8y0em728c as await_1 } from '../kotlinx-coroutines-core.mjs';
136
+ //region block: imports
137
+ //endregion
138
+ //region block: pre-declaration
139
+ initMetadataForObject(DefaultCallbacks, 'DefaultCallbacks');
140
+ initMetadataForCompanion(Companion);
141
+ initMetadataForClass(BindsMirror, 'BindsMirror');
142
+ initMetadataForClass(MetroFactory, 'MetroFactory');
143
+ function bindsAsKeyManagerService(instance) {
144
+ // Inline function 'kotlin.error' call
145
+ var message = 'Never called';
146
+ throw IllegalStateException_init_$Create$(toString(message));
147
+ }
148
+ function bindsAsSimpleSignatureService(instance) {
149
+ // Inline function 'kotlin.error' call
150
+ var message = 'Never called';
151
+ throw IllegalStateException_init_$Create$(toString(message));
152
+ }
153
+ initMetadataForInterface(MetroContributionToSessionScope, 'MetroContributionToSessionScope');
154
+ initMetadataForCoroutine($resolvePublicKeyCOROUTINE$, CoroutineImpl);
155
+ initMetadataForCoroutine($generateKeyCOROUTINE$, CoroutineImpl);
156
+ initMetadataForCoroutine($createRawSignatureCOROUTINE$, CoroutineImpl);
157
+ initMetadataForCoroutine($isValidRawSignatureCOROUTINE$, CoroutineImpl);
158
+ initMetadataForCoroutine($encryptCOROUTINE$, CoroutineImpl);
159
+ initMetadataForCoroutine($encrypt$suspendBridgeCOROUTINE$, CoroutineImpl);
160
+ initMetadataForCoroutine($decryptCOROUTINE$, CoroutineImpl);
161
+ initMetadataForCoroutine($decrypt$suspendBridgeCOROUTINE$, CoroutineImpl);
162
+ initMetadataForCoroutine($wrapKeyCOROUTINE$, CoroutineImpl);
163
+ initMetadataForCoroutine($wrapKey$suspendBridgeCOROUTINE$, CoroutineImpl);
164
+ initMetadataForCoroutine($unwrapKeyCOROUTINE$, CoroutineImpl);
165
+ initMetadataForCoroutine($unwrapKey$suspendBridgeCOROUTINE$, CoroutineImpl);
166
+ initMetadataForCoroutine($performKeyAgreementCOROUTINE$, CoroutineImpl);
167
+ initMetadataForCoroutine($performKeyAgreement$suspendBridgeCOROUTINE$, CoroutineImpl);
168
+ initMetadataForCoroutine($storeKeyCOROUTINE$, CoroutineImpl);
169
+ initMetadataForCoroutine($storeKey$suspendBridgeCOROUTINE$, CoroutineImpl);
170
+ initMetadataForCoroutine($listKeysCOROUTINE$, CoroutineImpl);
171
+ initMetadataForCoroutine($listKeys$suspendBridgeCOROUTINE$, CoroutineImpl);
172
+ initMetadataForCoroutine($listKeys$suspendBridgeCOROUTINE$_0, CoroutineImpl);
173
+ initMetadataForCoroutine($getKeyCOROUTINE$, CoroutineImpl);
174
+ initMetadataForCoroutine($getKey$suspendBridgeCOROUTINE$, CoroutineImpl);
175
+ initMetadataForCoroutine($deleteKeyCOROUTINE$, CoroutineImpl);
176
+ initMetadataForCoroutine($deleteKey$suspendBridgeCOROUTINE$, CoroutineImpl);
177
+ initMetadataForClass(KeyManagerServiceImpl, 'KeyManagerServiceImpl', VOID, VOID, [KeyManagerService], [1, 4, 6, 3, 0]);
178
+ initMetadataForCompanion(Companion_0);
179
+ initMetadataForClass(BindsMirror_0, 'BindsMirror');
180
+ initMetadataForClass(MetroFactory_0, 'MetroFactory');
181
+ function bindsAsKeyResolverRegistry(instance) {
182
+ // Inline function 'kotlin.error' call
183
+ var message = 'Never called';
184
+ throw IllegalStateException_init_$Create$(toString(message));
185
+ }
186
+ initMetadataForInterface(MetroContributionToSessionScope_0, 'MetroContributionToSessionScope');
187
+ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
188
+ initMetadataForClass(KeyResolverRegistryImpl, 'KeyResolverRegistryImpl', VOID, VOID, [KeyResolverRegistry]);
189
+ initMetadataForCompanion(Companion_1);
190
+ initMetadataForClass(BindsMirror_1, 'BindsMirror');
191
+ initMetadataForClass(MetroFactory_1, 'MetroFactory');
192
+ function bindsAsKmsProviderRegistry(instance) {
193
+ // Inline function 'kotlin.error' call
194
+ var message = 'Never called';
195
+ throw IllegalStateException_init_$Create$(toString(message));
196
+ }
197
+ initMetadataForInterface(MetroContributionToSessionScope_1, 'MetroContributionToSessionScope');
198
+ initMetadataForClass(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
199
+ initMetadataForClass(KmsProviderRegistryImpl, 'KmsProviderRegistryImpl', VOID, VOID, [KmsProviderRegistry]);
200
+ initMetadataForCompanion(Companion_2);
201
+ initMetadataForInterface(MemoryKeyStoreServiceFactory, 'MemoryKeyStoreServiceFactory');
202
+ initMetadataForClass(Impl, 'Impl', VOID, VOID, [MemoryKeyStoreServiceFactory]);
203
+ initMetadataForCompanion(Companion_3);
204
+ initMetadataForCoroutine($listKeys$suspendBridgeCOROUTINE$_1, CoroutineImpl);
205
+ initMetadataForCoroutine($getKey$suspendBridgeCOROUTINE$_0, CoroutineImpl);
206
+ initMetadataForCoroutine($deleteKeyCOROUTINE$_0, CoroutineImpl);
207
+ initMetadataForCoroutine($deleteKey$suspendBridgeCOROUTINE$_0, CoroutineImpl);
208
+ initMetadataForCoroutine($storeKey$suspendBridgeCOROUTINE$_0, CoroutineImpl);
209
+ initMetadataForCoroutine($storeCertificateChain$suspendBridgeCOROUTINE$, CoroutineImpl);
210
+ initMetadataForCoroutine($listCertificateChainAliases$suspendBridgeCOROUTINE$, CoroutineImpl);
211
+ initMetadataForCoroutine($getCertificateChain$suspendBridgeCOROUTINE$, CoroutineImpl);
212
+ initMetadataForCoroutine($deleteCertificateChain$suspendBridgeCOROUTINE$, CoroutineImpl);
213
+ initMetadataForCoroutine($storeTrustedCertificate$suspendBridgeCOROUTINE$, CoroutineImpl);
214
+ initMetadataForCoroutine($listCertificateAliases$suspendBridgeCOROUTINE$, CoroutineImpl);
215
+ initMetadataForCoroutine($getCertificate$suspendBridgeCOROUTINE$, CoroutineImpl);
216
+ initMetadataForCoroutine($deleteCertificate$suspendBridgeCOROUTINE$, CoroutineImpl);
217
+ initMetadataForCoroutine($listKeys$suspendBridgeCOROUTINE$_2, CoroutineImpl);
218
+ initMetadataForClass(MemoryKeyStoreService, 'MemoryKeyStoreService', VOID, VOID, [KeyStore], [0, 1, 4, 3, 2]);
219
+ initMetadataForInterface(IX509JSCallback, 'IX509JSCallback', VOID, VOID, [X509VerifyPlatformCallback]);
220
+ function verifyCertificateChain(req, $completion) {
221
+ var context = req.validateToContext();
222
+ if (context.isErr) {
223
+ return context.error;
224
+ }
225
+ return await_1(this.verifyCertificateChainUsingPlatformCallback(context.value), $completion);
226
+ }
227
+ initMetadataForInterface(X509VerifyVerifyPlatformCallbackJSPromises, 'X509VerifyVerifyPlatformCallbackJSPromises', VOID, VOID, [X509VerifyService, IX509JSCallback, HasPlatformCallback], [1]);
228
+ //endregion
229
+ function DefaultCallbacks() {
230
+ this.u5i_1 = null;
231
+ this.v5i_1 = null;
232
+ }
233
+ protoOf(DefaultCallbacks).x509 = function () {
234
+ var callback = this.u5i_1;
235
+ $l$block: {
236
+ // Inline function 'kotlin.checkNotNull' call
237
+ if (callback == null) {
238
+ var message = 'No default X509 Platform Callback implementation was registered';
239
+ throw IllegalStateException_init_$Create$(toString(message));
240
+ } else {
241
+ break $l$block;
242
+ }
243
+ }
244
+ return callback;
245
+ };
246
+ protoOf(DefaultCallbacks).w5i = function (x509Callback) {
247
+ this.u5i_1 = x509Callback;
248
+ };
249
+ protoOf(DefaultCallbacks).setX509Default = function (x509Callback, $super) {
250
+ x509Callback = x509Callback === VOID ? null : x509Callback;
251
+ var tmp;
252
+ if ($super === VOID) {
253
+ this.w5i(x509Callback);
254
+ tmp = Unit_instance;
255
+ } else {
256
+ tmp = $super.w5i.call(this, x509Callback);
257
+ }
258
+ return tmp;
259
+ };
260
+ protoOf(DefaultCallbacks).hasX509Default = function () {
261
+ return !(this.u5i_1 == null);
262
+ };
263
+ protoOf(DefaultCallbacks).coseCrypto = function () {
264
+ var callback = this.v5i_1;
265
+ $l$block: {
266
+ // Inline function 'kotlin.checkNotNull' call
267
+ if (callback == null) {
268
+ var message = 'No default Cose Crypto Platform Callback implementation was registered';
269
+ throw IllegalStateException_init_$Create$(toString(message));
270
+ } else {
271
+ break $l$block;
272
+ }
273
+ }
274
+ return callback;
275
+ };
276
+ protoOf(DefaultCallbacks).hasCoseCryptoDefault = function () {
277
+ return !(this.v5i_1 == null);
278
+ };
279
+ protoOf(DefaultCallbacks).x5i = function (coseCryptoCallback) {
280
+ this.v5i_1 = coseCryptoCallback;
281
+ };
282
+ protoOf(DefaultCallbacks).setCoseCryptoDefault = function (coseCryptoCallback, $super) {
283
+ coseCryptoCallback = coseCryptoCallback === VOID ? null : coseCryptoCallback;
284
+ var tmp;
285
+ if ($super === VOID) {
286
+ this.x5i(coseCryptoCallback);
287
+ tmp = Unit_instance;
288
+ } else {
289
+ tmp = $super.x5i.call(this, coseCryptoCallback);
290
+ }
291
+ return tmp;
292
+ };
293
+ var DefaultCallbacks_instance;
294
+ function DefaultCallbacks_getInstance() {
295
+ return DefaultCallbacks_instance;
296
+ }
297
+ function Companion() {
298
+ }
299
+ protoOf(Companion).create = function (providerRegistry, resolverRegistry, keyStoreService, execution, queryProviderCommand, queryProvidersCommand, getAllCapabilitiesCommand, createRawSignatureCommand, verifyRawSignatureCommand, encryptCommand, decryptCommand, wrapKeyCommand, unwrapKeyCommand, performKeyAgreementCommand, generateKeyCommand, listKeysCommand, getKeyCommand, storeKeyCommand, deleteKeyCommand, resolvePublicKeyCommand) {
300
+ return new MetroFactory(providerRegistry, resolverRegistry, keyStoreService, execution, queryProviderCommand, queryProvidersCommand, getAllCapabilitiesCommand, createRawSignatureCommand, verifyRawSignatureCommand, encryptCommand, decryptCommand, wrapKeyCommand, unwrapKeyCommand, performKeyAgreementCommand, generateKeyCommand, listKeysCommand, getKeyCommand, storeKeyCommand, deleteKeyCommand, resolvePublicKeyCommand);
301
+ };
302
+ protoOf(Companion).newInstance = function (providerRegistry, resolverRegistry, keyStoreService, execution, queryProviderCommand, queryProvidersCommand, getAllCapabilitiesCommand, createRawSignatureCommand, verifyRawSignatureCommand, encryptCommand, decryptCommand, wrapKeyCommand, unwrapKeyCommand, performKeyAgreementCommand, generateKeyCommand, listKeysCommand, getKeyCommand, storeKeyCommand, deleteKeyCommand, resolvePublicKeyCommand) {
303
+ return new KeyManagerServiceImpl(providerRegistry, resolverRegistry, keyStoreService, execution, queryProviderCommand, queryProvidersCommand, getAllCapabilitiesCommand, createRawSignatureCommand, verifyRawSignatureCommand, encryptCommand, decryptCommand, wrapKeyCommand, unwrapKeyCommand, performKeyAgreementCommand, generateKeyCommand, listKeysCommand, getKeyCommand, storeKeyCommand, deleteKeyCommand, resolvePublicKeyCommand);
304
+ };
305
+ var Companion_instance_2;
306
+ function Companion_getInstance_2() {
307
+ return Companion_instance_2;
308
+ }
309
+ function BindsMirror() {
310
+ }
311
+ function performKeyAgreementDirect($this, privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, $completion) {
312
+ var tmp0_elvis_lhs = CoseJoseKeyMappingService_instance.toJwkKeyInfo(privateKeyInfo).key;
313
+ var tmp;
314
+ if (tmp0_elvis_lhs == null) {
315
+ throw IllegalArgumentException_init_$Create$('Private key info must contain a key');
316
+ } else {
317
+ tmp = tmp0_elvis_lhs;
318
+ }
319
+ var privateKeyJwk = tmp;
320
+ var tmp1_elvis_lhs = CoseJoseKeyMappingService_instance.toJwkKeyInfo(publicKeyInfo).key;
321
+ var tmp_0;
322
+ if (tmp1_elvis_lhs == null) {
323
+ throw IllegalArgumentException_init_$Create$('Public key info must contain a key');
324
+ } else {
325
+ tmp_0 = tmp1_elvis_lhs;
326
+ }
327
+ var publicKeyJwk = tmp_0;
328
+ // Inline function 'kotlin.require' call
329
+ if (!privateKeyJwk.y45_1.equals(JwaKeyType_EC_getInstance())) {
330
+ var message = 'Private key must be an EC key for ECDH key agreement, got: ' + privateKeyJwk.y45_1.toString();
331
+ throw IllegalArgumentException_init_$Create$(toString(message));
332
+ }
333
+ // Inline function 'kotlin.require' call
334
+ if (!publicKeyJwk.y45_1.equals(JwaKeyType_EC_getInstance())) {
335
+ var message_0 = 'Public key must be an EC key for ECDH key agreement, got: ' + publicKeyJwk.y45_1.toString();
336
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
337
+ }
338
+ // Inline function 'kotlin.require' call
339
+ if (!!(privateKeyJwk.o45_1 == null)) {
340
+ var message_1 = "Private key must have 'd' parameter for key agreement";
341
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
342
+ }
343
+ // Inline function 'kotlin.require' call
344
+ if (!(!(publicKeyJwk.b46_1 == null) && !(publicKeyJwk.g46_1 == null))) {
345
+ var message_2 = "Public key must have 'x' and 'y' coordinates for key agreement";
346
+ throw IllegalArgumentException_init_$Create$(toString(message_2));
347
+ }
348
+ var tmp2_safe_receiver = privateKeyJwk.n45_1;
349
+ var tmp_1;
350
+ if (tmp2_safe_receiver == null) {
351
+ tmp_1 = null;
352
+ } else {
353
+ // Inline function 'kotlin.let' call
354
+ tmp_1 = Companion_getInstance().d42(tmp2_safe_receiver);
355
+ }
356
+ var tmp3_elvis_lhs = tmp_1;
357
+ var tmp_2;
358
+ if (tmp3_elvis_lhs == null) {
359
+ var tmp4_safe_receiver = publicKeyJwk.n45_1;
360
+ var tmp_3;
361
+ if (tmp4_safe_receiver == null) {
362
+ tmp_3 = null;
363
+ } else {
364
+ // Inline function 'kotlin.let' call
365
+ tmp_3 = Companion_getInstance().d42(tmp4_safe_receiver);
366
+ }
367
+ tmp_2 = tmp_3;
368
+ } else {
369
+ tmp_2 = tmp3_elvis_lhs;
370
+ }
371
+ var tmp5_elvis_lhs = tmp_2;
372
+ var curve = tmp5_elvis_lhs == null ? P_256_getInstance() : tmp5_elvis_lhs;
373
+ return EcdhUtils_instance.x4a(privateKeyJwk, publicKeyJwk, curve, $completion);
374
+ }
375
+ protoOf(MetroFactory).z1b = function () {
376
+ return Companion_instance_2.newInstance(this.y5i_1.z1b(), this.z5i_1.z1b(), this.a5j_1.z1b(), this.b5j_1.z1b(), this.c5j_1.z1b(), this.d5j_1.z1b(), this.e5j_1.z1b(), this.f5j_1.z1b(), this.g5j_1.z1b(), this.h5j_1.z1b(), this.i5j_1.z1b(), this.j5j_1.z1b(), this.k5j_1.z1b(), this.l5j_1.z1b(), this.m5j_1.z1b(), this.n5j_1.z1b(), this.o5j_1.z1b(), this.p5j_1.z1b(), this.q5j_1.z1b(), this.r5j_1.z1b());
377
+ };
378
+ function MetroFactory(providerRegistry, resolverRegistry, keyStoreService, execution, queryProviderCommand, queryProvidersCommand, getAllCapabilitiesCommand, createRawSignatureCommand, verifyRawSignatureCommand, encryptCommand, decryptCommand, wrapKeyCommand, unwrapKeyCommand, performKeyAgreementCommand, generateKeyCommand, listKeysCommand, getKeyCommand, storeKeyCommand, deleteKeyCommand, resolvePublicKeyCommand) {
379
+ this.y5i_1 = providerRegistry;
380
+ this.z5i_1 = resolverRegistry;
381
+ this.a5j_1 = keyStoreService;
382
+ this.b5j_1 = execution;
383
+ this.c5j_1 = queryProviderCommand;
384
+ this.d5j_1 = queryProvidersCommand;
385
+ this.e5j_1 = getAllCapabilitiesCommand;
386
+ this.f5j_1 = createRawSignatureCommand;
387
+ this.g5j_1 = verifyRawSignatureCommand;
388
+ this.h5j_1 = encryptCommand;
389
+ this.i5j_1 = decryptCommand;
390
+ this.j5j_1 = wrapKeyCommand;
391
+ this.k5j_1 = unwrapKeyCommand;
392
+ this.l5j_1 = performKeyAgreementCommand;
393
+ this.m5j_1 = generateKeyCommand;
394
+ this.n5j_1 = listKeysCommand;
395
+ this.o5j_1 = getKeyCommand;
396
+ this.p5j_1 = storeKeyCommand;
397
+ this.q5j_1 = deleteKeyCommand;
398
+ this.r5j_1 = resolvePublicKeyCommand;
399
+ }
400
+ protoOf(MetroFactory).mirrorFunction = function (providerRegistry, resolverRegistry, keyStoreService, execution, queryProviderCommand, queryProvidersCommand, getAllCapabilitiesCommand, createRawSignatureCommand, verifyRawSignatureCommand, encryptCommand, decryptCommand, wrapKeyCommand, unwrapKeyCommand, performKeyAgreementCommand, generateKeyCommand, listKeysCommand, getKeyCommand, storeKeyCommand, deleteKeyCommand, resolvePublicKeyCommand) {
401
+ // Inline function 'kotlin.error' call
402
+ var message = 'Never called';
403
+ throw IllegalStateException_init_$Create$(toString(message));
404
+ };
405
+ function MetroContributionToSessionScope() {
406
+ }
407
+ function $resolvePublicKeyCOROUTINE$(_this__u8e3s4, keyInfo, identifierMethod, trustedCerts, verifyX509CertificateChain, resultContinuation) {
408
+ CoroutineImpl.call(this, resultContinuation);
409
+ this.a5k_1 = _this__u8e3s4;
410
+ this.b5k_1 = keyInfo;
411
+ this.c5k_1 = identifierMethod;
412
+ this.d5k_1 = trustedCerts;
413
+ this.e5k_1 = verifyX509CertificateChain;
414
+ }
415
+ protoOf($resolvePublicKeyCOROUTINE$).d9 = function () {
416
+ var suspendResult = this.x8_1;
417
+ $sm: do
418
+ try {
419
+ var tmp = this.v8_1;
420
+ switch (tmp) {
421
+ case 0:
422
+ this.w8_1 = 4;
423
+ var command = this.a5k_1.y5k_1;
424
+ var exec = this.a5k_1.i5k_1;
425
+ if (!(command == null) && !(exec == null)) {
426
+ var args = new ResolvePublicKeyArgs(this.b5k_1, this.c5k_1, this.d5k_1, this.e5k_1);
427
+ this.v8_1 = 3;
428
+ suspendResult = command.n2j(args, this);
429
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
430
+ return suspendResult;
431
+ }
432
+ continue $sm;
433
+ } else {
434
+ this.v8_1 = 1;
435
+ continue $sm;
436
+ }
437
+
438
+ case 1:
439
+ this.v8_1 = 2;
440
+ suspendResult = this.a5k_1.getResolverByKeyTypeOrIdentifier(this.c5k_1, this.b5k_1.keyType, this.b5k_1.l3n()).b4f(this.b5k_1, this.c5k_1, this.d5k_1, this.e5k_1, this);
441
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
442
+ return suspendResult;
443
+ }
444
+
445
+ continue $sm;
446
+ case 2:
447
+ return suspendResult;
448
+ case 3:
449
+ var result = suspendResult;
450
+ var this_0 = result.a2f_1;
451
+ var tmp_0;
452
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
453
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
454
+ } else {
455
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
456
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Resolve public key failed' : tmp0_elvis_lhs);
457
+ }
458
+
459
+ var tmp0_elvis_lhs_0 = tmp_0.resolvedKeyInfo;
460
+ var tmp_1;
461
+ if (tmp0_elvis_lhs_0 == null) {
462
+ throw new PKIException('Resolved key info is null');
463
+ } else {
464
+ tmp_1 = tmp0_elvis_lhs_0;
465
+ }
466
+
467
+ var resolvedKeyInfo = tmp_1;
468
+ return isInterface(resolvedKeyInfo, ResolvedKeyInfoType) ? resolvedKeyInfo : THROW_CCE();
469
+ case 4:
470
+ throw this.y8_1;
471
+ }
472
+ } catch ($p) {
473
+ var e = $p;
474
+ if (this.w8_1 === 4) {
475
+ throw e;
476
+ } else {
477
+ this.v8_1 = this.w8_1;
478
+ this.y8_1 = e;
479
+ }
480
+ }
481
+ while (true);
482
+ };
483
+ function $generateKeyCOROUTINE$(_this__u8e3s4, providerId, alias, use, keyOperations, alg, keyVisibility, resultContinuation) {
484
+ CoroutineImpl.call(this, resultContinuation);
485
+ this.h5l_1 = _this__u8e3s4;
486
+ this.i5l_1 = providerId;
487
+ this.j5l_1 = alias;
488
+ this.k5l_1 = use;
489
+ this.l5l_1 = keyOperations;
490
+ this.m5l_1 = alg;
491
+ this.n5l_1 = keyVisibility;
492
+ }
493
+ protoOf($generateKeyCOROUTINE$).d9 = function () {
494
+ var suspendResult = this.x8_1;
495
+ $sm: do
496
+ try {
497
+ var tmp = this.v8_1;
498
+ switch (tmp) {
499
+ case 0:
500
+ this.w8_1 = 4;
501
+ var command = this.h5l_1.t5k_1;
502
+ var exec = this.h5l_1.i5k_1;
503
+ if (!(command == null) && !(exec == null)) {
504
+ var args = new GenerateKeyArgs(this.i5l_1, this.j5l_1, this.k5l_1, this.l5l_1, this.m5l_1, this.n5l_1);
505
+ this.v8_1 = 3;
506
+ suspendResult = command.n2j(args, this);
507
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
508
+ return suspendResult;
509
+ }
510
+ continue $sm;
511
+ } else {
512
+ this.v8_1 = 1;
513
+ continue $sm;
514
+ }
515
+
516
+ case 1:
517
+ var kmsProvider = this.h5l_1.getProvider(this.i5l_1, this.m5l_1);
518
+ this.v8_1 = 2;
519
+ suspendResult = generateKeyAsync$virtualSuspendBridge(kmsProvider, this.j5l_1, this.k5l_1, this.l5l_1, this.m5l_1, VOID, this);
520
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
521
+ return suspendResult;
522
+ }
523
+
524
+ continue $sm;
525
+ case 2:
526
+ var keyPair = suspendResult;
527
+ return keyPair;
528
+ case 3:
529
+ var result = suspendResult;
530
+ var this_0 = result.a2f_1;
531
+ var tmp_0;
532
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
533
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
534
+ } else {
535
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
536
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Key generation failed' : tmp0_elvis_lhs);
537
+ }
538
+
539
+ var tmp0_elvis_lhs_0 = tmp_0.keyPair;
540
+ var tmp_1;
541
+ if (tmp0_elvis_lhs_0 == null) {
542
+ throw new PKIException('Generated key pair is null');
543
+ } else {
544
+ tmp_1 = tmp0_elvis_lhs_0;
545
+ }
546
+
547
+ return tmp_1;
548
+ case 4:
549
+ throw this.y8_1;
550
+ }
551
+ } catch ($p) {
552
+ var e = $p;
553
+ if (this.w8_1 === 4) {
554
+ throw e;
555
+ } else {
556
+ this.v8_1 = this.w8_1;
557
+ this.y8_1 = e;
558
+ }
559
+ }
560
+ while (true);
561
+ };
562
+ function $createRawSignatureCOROUTINE$(_this__u8e3s4, keyInfo, input, requireX5Chain, resultContinuation) {
563
+ CoroutineImpl.call(this, resultContinuation);
564
+ this.w5l_1 = _this__u8e3s4;
565
+ this.x5l_1 = keyInfo;
566
+ this.y5l_1 = input;
567
+ this.z5l_1 = requireX5Chain;
568
+ }
569
+ protoOf($createRawSignatureCOROUTINE$).d9 = function () {
570
+ var suspendResult = this.x8_1;
571
+ $sm: do
572
+ try {
573
+ var tmp = this.v8_1;
574
+ switch (tmp) {
575
+ case 0:
576
+ this.w8_1 = 4;
577
+ var command = this.w5l_1.m5k_1;
578
+ var exec = this.w5l_1.i5k_1;
579
+ if (!(command == null) && !(exec == null)) {
580
+ var args = new CreateRawSignatureArgs(this.x5l_1, this.y5l_1, this.z5l_1);
581
+ this.v8_1 = 3;
582
+ suspendResult = command.n2j(args, this);
583
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
584
+ return suspendResult;
585
+ }
586
+ continue $sm;
587
+ } else {
588
+ this.v8_1 = 1;
589
+ continue $sm;
590
+ }
591
+
592
+ case 1:
593
+ this.v8_1 = 2;
594
+ suspendResult = this.w5l_1.getProvider(this.x5l_1.l3n(), this.x5l_1.signatureAlgorithm).p4n(this.x5l_1, this.y5l_1, this.z5l_1, this);
595
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
596
+ return suspendResult;
597
+ }
598
+
599
+ continue $sm;
600
+ case 2:
601
+ return suspendResult;
602
+ case 3:
603
+ var result = suspendResult;
604
+ var this_0 = result.a2f_1;
605
+ var tmp_0;
606
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
607
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
608
+ } else {
609
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
610
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Signature creation failed' : tmp0_elvis_lhs);
611
+ }
612
+
613
+ return tmp_0.signature;
614
+ case 4:
615
+ throw this.y8_1;
616
+ }
617
+ } catch ($p) {
618
+ var e = $p;
619
+ if (this.w8_1 === 4) {
620
+ throw e;
621
+ } else {
622
+ this.v8_1 = this.w8_1;
623
+ this.y8_1 = e;
624
+ }
625
+ }
626
+ while (true);
627
+ };
628
+ function $isValidRawSignatureCOROUTINE$(_this__u8e3s4, keyInfo, input, signature, resultContinuation) {
629
+ CoroutineImpl.call(this, resultContinuation);
630
+ this.i5m_1 = _this__u8e3s4;
631
+ this.j5m_1 = keyInfo;
632
+ this.k5m_1 = input;
633
+ this.l5m_1 = signature;
634
+ }
635
+ protoOf($isValidRawSignatureCOROUTINE$).d9 = function () {
636
+ var suspendResult = this.x8_1;
637
+ $sm: do
638
+ try {
639
+ var tmp = this.v8_1;
640
+ switch (tmp) {
641
+ case 0:
642
+ this.w8_1 = 8;
643
+ var tmp_0;
644
+ if (this.j5m_1.key == null && this.j5m_1.j3n() == null && this.j5m_1.m3n() == null) {
645
+ var this_0 = this.j5m_1.x5c;
646
+ var tmp_1;
647
+ if (this_0 == null) {
648
+ tmp_1 = true;
649
+ } else {
650
+ tmp_1 = this_0.length === 0;
651
+ }
652
+ tmp_0 = !tmp_1;
653
+ } else {
654
+ tmp_0 = false;
655
+ }
656
+
657
+ if (tmp_0) {
658
+ this.v8_1 = 1;
659
+ suspendResult = this.i5m_1.w4e(this.j5m_1, IdentifierMethod_x5c_getInstance(), VOID, VOID, this);
660
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
661
+ return suspendResult;
662
+ }
663
+ continue $sm;
664
+ } else {
665
+ var tmp_2 = this;
666
+ tmp_2.n5m_1 = this.j5m_1;
667
+ this.v8_1 = 2;
668
+ continue $sm;
669
+ }
670
+
671
+ case 1:
672
+ this.n5m_1 = suspendResult;
673
+ this.v8_1 = 2;
674
+ continue $sm;
675
+ case 2:
676
+ this.m5m_1 = this.n5m_1;
677
+ var command = this.i5m_1.n5k_1;
678
+ var exec = this.i5m_1.i5k_1;
679
+ if (!(command == null) && !(exec == null)) {
680
+ var args = new VerifyRawSignatureArgs(this.m5m_1, this.k5m_1, this.l5m_1);
681
+ this.v8_1 = 7;
682
+ suspendResult = command.n2j(args, this);
683
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
684
+ return suspendResult;
685
+ }
686
+ continue $sm;
687
+ } else {
688
+ this.v8_1 = 3;
689
+ continue $sm;
690
+ }
691
+
692
+ case 3:
693
+ var kms = this.m5m_1.l3n();
694
+ var alg = this.m5m_1.signatureAlgorithm;
695
+ if (!(kms === null) || !(alg === null)) {
696
+ this.v8_1 = 6;
697
+ suspendResult = this.i5m_1.getProvider(kms, alg).q4n(this.m5m_1, this.k5m_1, this.l5m_1, this);
698
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
699
+ return suspendResult;
700
+ }
701
+ continue $sm;
702
+ } else {
703
+ this.v8_1 = 4;
704
+ continue $sm;
705
+ }
706
+
707
+ case 4:
708
+ this.v8_1 = 5;
709
+ suspendResult = this.i5m_1.getProviderById(this.i5m_1.defaultProviderId()).q4n(this.m5m_1, this.k5m_1, this.l5m_1, this);
710
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
711
+ return suspendResult;
712
+ }
713
+
714
+ continue $sm;
715
+ case 5:
716
+ return suspendResult;
717
+ case 6:
718
+ return suspendResult;
719
+ case 7:
720
+ var result = suspendResult;
721
+ var this_1 = result.a2f_1;
722
+ var tmp_3;
723
+ if (_Result___get_isOk__impl__qbhaup(this_1)) {
724
+ tmp_3 = _Result___get_value__impl__bjfvqg(this_1);
725
+ } else {
726
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_1).message.defaultMessage;
727
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Signature verification failed' : tmp0_elvis_lhs);
728
+ }
729
+
730
+ return tmp_3.isValid;
731
+ case 8:
732
+ throw this.y8_1;
733
+ }
734
+ } catch ($p) {
735
+ var e = $p;
736
+ if (this.w8_1 === 8) {
737
+ throw e;
738
+ } else {
739
+ this.v8_1 = this.w8_1;
740
+ this.y8_1 = e;
741
+ }
742
+ }
743
+ while (true);
744
+ };
745
+ function $encryptCOROUTINE$(_this__u8e3s4, keyInfo, plaintext, algorithm, additionalAuthenticatedData, resultContinuation) {
746
+ CoroutineImpl.call(this, resultContinuation);
747
+ this.w5m_1 = _this__u8e3s4;
748
+ this.x5m_1 = keyInfo;
749
+ this.y5m_1 = plaintext;
750
+ this.z5m_1 = algorithm;
751
+ this.a5n_1 = additionalAuthenticatedData;
752
+ }
753
+ protoOf($encryptCOROUTINE$).d9 = function () {
754
+ var suspendResult = this.x8_1;
755
+ $sm: do
756
+ try {
757
+ var tmp = this.v8_1;
758
+ switch (tmp) {
759
+ case 0:
760
+ this.w8_1 = 4;
761
+ var command = this.w5m_1.o5k_1;
762
+ var exec = this.w5m_1.i5k_1;
763
+ if (!(command == null) && !(exec == null)) {
764
+ var args = new EncryptArgs(this.x5m_1, this.y5m_1, this.z5m_1, this.a5n_1);
765
+ this.v8_1 = 3;
766
+ suspendResult = command.n2j(args, this);
767
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
768
+ return suspendResult;
769
+ }
770
+ continue $sm;
771
+ } else {
772
+ this.v8_1 = 1;
773
+ continue $sm;
774
+ }
775
+
776
+ case 1:
777
+ this.v8_1 = 2;
778
+ suspendResult = encrypt$virtualSuspendBridge(this.w5m_1.getProvider(this.x5m_1.l3n(), this.x5m_1.signatureAlgorithm), this.x5m_1, this.y5m_1, this.z5m_1, this.a5n_1, this);
779
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
780
+ return suspendResult;
781
+ }
782
+
783
+ continue $sm;
784
+ case 2:
785
+ return suspendResult;
786
+ case 3:
787
+ var result = suspendResult;
788
+ var this_0 = result.a2f_1;
789
+ var tmp_0;
790
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
791
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
792
+ } else {
793
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
794
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Encryption failed' : tmp0_elvis_lhs);
795
+ }
796
+
797
+ var encResult = tmp_0;
798
+ return new EncryptionResult(encResult.ciphertext, encResult.iv, encResult.authTag);
799
+ case 4:
800
+ throw this.y8_1;
801
+ }
802
+ } catch ($p) {
803
+ var e = $p;
804
+ if (this.w8_1 === 4) {
805
+ throw e;
806
+ } else {
807
+ this.v8_1 = this.w8_1;
808
+ this.y8_1 = e;
809
+ }
810
+ }
811
+ while (true);
812
+ };
813
+ function $encrypt$suspendBridgeCOROUTINE$(_this__u8e3s4, keyInfo, plaintext, algorithm, additionalAuthenticatedData, resultContinuation) {
814
+ CoroutineImpl.call(this, resultContinuation);
815
+ this.j5n_1 = _this__u8e3s4;
816
+ this.k5n_1 = keyInfo;
817
+ this.l5n_1 = plaintext;
818
+ this.m5n_1 = algorithm;
819
+ this.n5n_1 = additionalAuthenticatedData;
820
+ }
821
+ protoOf($encrypt$suspendBridgeCOROUTINE$).d9 = function () {
822
+ var suspendResult = this.x8_1;
823
+ $sm: do
824
+ try {
825
+ var tmp = this.v8_1;
826
+ switch (tmp) {
827
+ case 0:
828
+ this.w8_1 = 4;
829
+ if (this.j5n_1.encrypt === protoOf(KeyManagerServiceImpl).encrypt) {
830
+ this.v8_1 = 2;
831
+ suspendResult = this.j5n_1.h4d(this.k5n_1, this.l5n_1, this.m5n_1, this.n5n_1, this);
832
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
833
+ return suspendResult;
834
+ }
835
+ continue $sm;
836
+ } else {
837
+ this.v8_1 = 1;
838
+ suspendResult = await_0(this.j5n_1.encrypt(this.k5n_1, this.l5n_1, this.m5n_1, this.n5n_1), this);
839
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
840
+ return suspendResult;
841
+ }
842
+ continue $sm;
843
+ }
844
+
845
+ case 1:
846
+ this.o5n_1 = suspendResult;
847
+ this.v8_1 = 3;
848
+ continue $sm;
849
+ case 2:
850
+ this.o5n_1 = suspendResult;
851
+ this.v8_1 = 3;
852
+ continue $sm;
853
+ case 3:
854
+ return this.o5n_1;
855
+ case 4:
856
+ throw this.y8_1;
857
+ }
858
+ } catch ($p) {
859
+ var e = $p;
860
+ if (this.w8_1 === 4) {
861
+ throw e;
862
+ } else {
863
+ this.v8_1 = this.w8_1;
864
+ this.y8_1 = e;
865
+ }
866
+ }
867
+ while (true);
868
+ };
869
+ function $decryptCOROUTINE$(_this__u8e3s4, keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, resultContinuation) {
870
+ CoroutineImpl.call(this, resultContinuation);
871
+ this.x5n_1 = _this__u8e3s4;
872
+ this.y5n_1 = keyInfo;
873
+ this.z5n_1 = ciphertext;
874
+ this.a5o_1 = algorithm;
875
+ this.b5o_1 = iv;
876
+ this.c5o_1 = authTag;
877
+ this.d5o_1 = additionalAuthenticatedData;
878
+ }
879
+ protoOf($decryptCOROUTINE$).d9 = function () {
880
+ var suspendResult = this.x8_1;
881
+ $sm: do
882
+ try {
883
+ var tmp = this.v8_1;
884
+ switch (tmp) {
885
+ case 0:
886
+ this.w8_1 = 4;
887
+ var command = this.x5n_1.p5k_1;
888
+ var exec = this.x5n_1.i5k_1;
889
+ if (!(command == null) && !(exec == null)) {
890
+ var args = new DecryptArgs(this.y5n_1, this.z5n_1, this.a5o_1, this.b5o_1, this.c5o_1, this.d5o_1);
891
+ this.v8_1 = 3;
892
+ suspendResult = command.n2j(args, this);
893
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
894
+ return suspendResult;
895
+ }
896
+ continue $sm;
897
+ } else {
898
+ this.v8_1 = 1;
899
+ continue $sm;
900
+ }
901
+
902
+ case 1:
903
+ this.v8_1 = 2;
904
+ suspendResult = decrypt$virtualSuspendBridge(this.x5n_1.getProvider(this.y5n_1.l3n(), this.y5n_1.signatureAlgorithm), this.y5n_1, this.z5n_1, this.a5o_1, this.b5o_1, this.c5o_1, this.d5o_1, this);
905
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
906
+ return suspendResult;
907
+ }
908
+
909
+ continue $sm;
910
+ case 2:
911
+ return suspendResult;
912
+ case 3:
913
+ var result = suspendResult;
914
+ var this_0 = result.a2f_1;
915
+ var tmp_0;
916
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
917
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
918
+ } else {
919
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
920
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Decryption failed' : tmp0_elvis_lhs);
921
+ }
922
+
923
+ return tmp_0.plaintext;
924
+ case 4:
925
+ throw this.y8_1;
926
+ }
927
+ } catch ($p) {
928
+ var e = $p;
929
+ if (this.w8_1 === 4) {
930
+ throw e;
931
+ } else {
932
+ this.v8_1 = this.w8_1;
933
+ this.y8_1 = e;
934
+ }
935
+ }
936
+ while (true);
937
+ };
938
+ function $decrypt$suspendBridgeCOROUTINE$(_this__u8e3s4, keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, resultContinuation) {
939
+ CoroutineImpl.call(this, resultContinuation);
940
+ this.m5o_1 = _this__u8e3s4;
941
+ this.n5o_1 = keyInfo;
942
+ this.o5o_1 = ciphertext;
943
+ this.p5o_1 = algorithm;
944
+ this.q5o_1 = iv;
945
+ this.r5o_1 = authTag;
946
+ this.s5o_1 = additionalAuthenticatedData;
947
+ }
948
+ protoOf($decrypt$suspendBridgeCOROUTINE$).d9 = function () {
949
+ var suspendResult = this.x8_1;
950
+ $sm: do
951
+ try {
952
+ var tmp = this.v8_1;
953
+ switch (tmp) {
954
+ case 0:
955
+ this.w8_1 = 4;
956
+ if (this.m5o_1.decrypt === protoOf(KeyManagerServiceImpl).decrypt) {
957
+ this.v8_1 = 2;
958
+ suspendResult = this.m5o_1.j4d(this.n5o_1, this.o5o_1, this.p5o_1, this.q5o_1, this.r5o_1, this.s5o_1, this);
959
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
960
+ return suspendResult;
961
+ }
962
+ continue $sm;
963
+ } else {
964
+ this.v8_1 = 1;
965
+ suspendResult = await_0(this.m5o_1.decrypt(this.n5o_1, this.o5o_1, this.p5o_1, this.q5o_1, this.r5o_1, this.s5o_1), this);
966
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
967
+ return suspendResult;
968
+ }
969
+ continue $sm;
970
+ }
971
+
972
+ case 1:
973
+ this.t5o_1 = suspendResult;
974
+ this.v8_1 = 3;
975
+ continue $sm;
976
+ case 2:
977
+ this.t5o_1 = suspendResult;
978
+ this.v8_1 = 3;
979
+ continue $sm;
980
+ case 3:
981
+ return this.t5o_1;
982
+ case 4:
983
+ throw this.y8_1;
984
+ }
985
+ } catch ($p) {
986
+ var e = $p;
987
+ if (this.w8_1 === 4) {
988
+ throw e;
989
+ } else {
990
+ this.v8_1 = this.w8_1;
991
+ this.y8_1 = e;
992
+ }
993
+ }
994
+ while (true);
995
+ };
996
+ function $wrapKeyCOROUTINE$(_this__u8e3s4, wrappingKeyInfo, keyToWrap, algorithm, resultContinuation) {
997
+ CoroutineImpl.call(this, resultContinuation);
998
+ this.c5p_1 = _this__u8e3s4;
999
+ this.d5p_1 = wrappingKeyInfo;
1000
+ this.e5p_1 = keyToWrap;
1001
+ this.f5p_1 = algorithm;
1002
+ }
1003
+ protoOf($wrapKeyCOROUTINE$).d9 = function () {
1004
+ var suspendResult = this.x8_1;
1005
+ $sm: do
1006
+ try {
1007
+ var tmp = this.v8_1;
1008
+ switch (tmp) {
1009
+ case 0:
1010
+ this.w8_1 = 4;
1011
+ var command = this.c5p_1.q5k_1;
1012
+ var exec = this.c5p_1.i5k_1;
1013
+ if (!(command == null) && !(exec == null)) {
1014
+ var args = new WrapKeyArgs(this.d5p_1, this.e5p_1, this.f5p_1);
1015
+ this.v8_1 = 3;
1016
+ suspendResult = command.n2j(args, this);
1017
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1018
+ return suspendResult;
1019
+ }
1020
+ continue $sm;
1021
+ } else {
1022
+ this.v8_1 = 1;
1023
+ continue $sm;
1024
+ }
1025
+
1026
+ case 1:
1027
+ this.v8_1 = 2;
1028
+ suspendResult = wrapKey$virtualSuspendBridge(this.c5p_1.getProvider(this.d5p_1.l3n(), this.d5p_1.signatureAlgorithm), this.d5p_1, this.e5p_1, this.f5p_1, this);
1029
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1030
+ return suspendResult;
1031
+ }
1032
+
1033
+ continue $sm;
1034
+ case 2:
1035
+ return suspendResult;
1036
+ case 3:
1037
+ var result = suspendResult;
1038
+ var this_0 = result.a2f_1;
1039
+ var tmp_0;
1040
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
1041
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
1042
+ } else {
1043
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
1044
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Key wrap failed' : tmp0_elvis_lhs);
1045
+ }
1046
+
1047
+ return tmp_0.wrappedKey;
1048
+ case 4:
1049
+ throw this.y8_1;
1050
+ }
1051
+ } catch ($p) {
1052
+ var e = $p;
1053
+ if (this.w8_1 === 4) {
1054
+ throw e;
1055
+ } else {
1056
+ this.v8_1 = this.w8_1;
1057
+ this.y8_1 = e;
1058
+ }
1059
+ }
1060
+ while (true);
1061
+ };
1062
+ function $wrapKey$suspendBridgeCOROUTINE$(_this__u8e3s4, wrappingKeyInfo, keyToWrap, algorithm, resultContinuation) {
1063
+ CoroutineImpl.call(this, resultContinuation);
1064
+ this.o5p_1 = _this__u8e3s4;
1065
+ this.p5p_1 = wrappingKeyInfo;
1066
+ this.q5p_1 = keyToWrap;
1067
+ this.r5p_1 = algorithm;
1068
+ }
1069
+ protoOf($wrapKey$suspendBridgeCOROUTINE$).d9 = function () {
1070
+ var suspendResult = this.x8_1;
1071
+ $sm: do
1072
+ try {
1073
+ var tmp = this.v8_1;
1074
+ switch (tmp) {
1075
+ case 0:
1076
+ this.w8_1 = 4;
1077
+ if (this.o5p_1.wrapKey === protoOf(KeyManagerServiceImpl).wrapKey) {
1078
+ this.v8_1 = 2;
1079
+ suspendResult = this.o5p_1.k4d(this.p5p_1, this.q5p_1, this.r5p_1, this);
1080
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1081
+ return suspendResult;
1082
+ }
1083
+ continue $sm;
1084
+ } else {
1085
+ this.v8_1 = 1;
1086
+ suspendResult = await_0(this.o5p_1.wrapKey(this.p5p_1, this.q5p_1, this.r5p_1), this);
1087
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1088
+ return suspendResult;
1089
+ }
1090
+ continue $sm;
1091
+ }
1092
+
1093
+ case 1:
1094
+ this.s5p_1 = suspendResult;
1095
+ this.v8_1 = 3;
1096
+ continue $sm;
1097
+ case 2:
1098
+ this.s5p_1 = suspendResult;
1099
+ this.v8_1 = 3;
1100
+ continue $sm;
1101
+ case 3:
1102
+ return this.s5p_1;
1103
+ case 4:
1104
+ throw this.y8_1;
1105
+ }
1106
+ } catch ($p) {
1107
+ var e = $p;
1108
+ if (this.w8_1 === 4) {
1109
+ throw e;
1110
+ } else {
1111
+ this.v8_1 = this.w8_1;
1112
+ this.y8_1 = e;
1113
+ }
1114
+ }
1115
+ while (true);
1116
+ };
1117
+ function $unwrapKeyCOROUTINE$(_this__u8e3s4, unwrappingKeyInfo, wrappedKey, algorithm, resultContinuation) {
1118
+ CoroutineImpl.call(this, resultContinuation);
1119
+ this.b5q_1 = _this__u8e3s4;
1120
+ this.c5q_1 = unwrappingKeyInfo;
1121
+ this.d5q_1 = wrappedKey;
1122
+ this.e5q_1 = algorithm;
1123
+ }
1124
+ protoOf($unwrapKeyCOROUTINE$).d9 = function () {
1125
+ var suspendResult = this.x8_1;
1126
+ $sm: do
1127
+ try {
1128
+ var tmp = this.v8_1;
1129
+ switch (tmp) {
1130
+ case 0:
1131
+ this.w8_1 = 4;
1132
+ var command = this.b5q_1.r5k_1;
1133
+ var exec = this.b5q_1.i5k_1;
1134
+ if (!(command == null) && !(exec == null)) {
1135
+ var args = new UnwrapKeyArgs(this.c5q_1, this.d5q_1, this.e5q_1);
1136
+ this.v8_1 = 3;
1137
+ suspendResult = command.n2j(args, this);
1138
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1139
+ return suspendResult;
1140
+ }
1141
+ continue $sm;
1142
+ } else {
1143
+ this.v8_1 = 1;
1144
+ continue $sm;
1145
+ }
1146
+
1147
+ case 1:
1148
+ this.v8_1 = 2;
1149
+ suspendResult = unwrapKey$virtualSuspendBridge(this.b5q_1.getProvider(this.c5q_1.l3n(), this.c5q_1.signatureAlgorithm), this.c5q_1, this.d5q_1, this.e5q_1, this);
1150
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1151
+ return suspendResult;
1152
+ }
1153
+
1154
+ continue $sm;
1155
+ case 2:
1156
+ return suspendResult;
1157
+ case 3:
1158
+ var result = suspendResult;
1159
+ var this_0 = result.a2f_1;
1160
+ var tmp_0;
1161
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
1162
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
1163
+ } else {
1164
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
1165
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Key unwrap failed' : tmp0_elvis_lhs);
1166
+ }
1167
+
1168
+ return tmp_0.unwrappedKey;
1169
+ case 4:
1170
+ throw this.y8_1;
1171
+ }
1172
+ } catch ($p) {
1173
+ var e = $p;
1174
+ if (this.w8_1 === 4) {
1175
+ throw e;
1176
+ } else {
1177
+ this.v8_1 = this.w8_1;
1178
+ this.y8_1 = e;
1179
+ }
1180
+ }
1181
+ while (true);
1182
+ };
1183
+ function $unwrapKey$suspendBridgeCOROUTINE$(_this__u8e3s4, unwrappingKeyInfo, wrappedKey, algorithm, resultContinuation) {
1184
+ CoroutineImpl.call(this, resultContinuation);
1185
+ this.n5q_1 = _this__u8e3s4;
1186
+ this.o5q_1 = unwrappingKeyInfo;
1187
+ this.p5q_1 = wrappedKey;
1188
+ this.q5q_1 = algorithm;
1189
+ }
1190
+ protoOf($unwrapKey$suspendBridgeCOROUTINE$).d9 = function () {
1191
+ var suspendResult = this.x8_1;
1192
+ $sm: do
1193
+ try {
1194
+ var tmp = this.v8_1;
1195
+ switch (tmp) {
1196
+ case 0:
1197
+ this.w8_1 = 4;
1198
+ if (this.n5q_1.unwrapKey === protoOf(KeyManagerServiceImpl).unwrapKey) {
1199
+ this.v8_1 = 2;
1200
+ suspendResult = this.n5q_1.l4d(this.o5q_1, this.p5q_1, this.q5q_1, this);
1201
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1202
+ return suspendResult;
1203
+ }
1204
+ continue $sm;
1205
+ } else {
1206
+ this.v8_1 = 1;
1207
+ suspendResult = await_0(this.n5q_1.unwrapKey(this.o5q_1, this.p5q_1, this.q5q_1), this);
1208
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1209
+ return suspendResult;
1210
+ }
1211
+ continue $sm;
1212
+ }
1213
+
1214
+ case 1:
1215
+ this.r5q_1 = suspendResult;
1216
+ this.v8_1 = 3;
1217
+ continue $sm;
1218
+ case 2:
1219
+ this.r5q_1 = suspendResult;
1220
+ this.v8_1 = 3;
1221
+ continue $sm;
1222
+ case 3:
1223
+ return this.r5q_1;
1224
+ case 4:
1225
+ throw this.y8_1;
1226
+ }
1227
+ } catch ($p) {
1228
+ var e = $p;
1229
+ if (this.w8_1 === 4) {
1230
+ throw e;
1231
+ } else {
1232
+ this.v8_1 = this.w8_1;
1233
+ this.y8_1 = e;
1234
+ }
1235
+ }
1236
+ while (true);
1237
+ };
1238
+ function $performKeyAgreementCOROUTINE$(_this__u8e3s4, privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, resultContinuation) {
1239
+ CoroutineImpl.call(this, resultContinuation);
1240
+ this.a5r_1 = _this__u8e3s4;
1241
+ this.b5r_1 = privateKeyInfo;
1242
+ this.c5r_1 = publicKeyInfo;
1243
+ this.d5r_1 = algorithm;
1244
+ this.e5r_1 = keyDataLen;
1245
+ }
1246
+ protoOf($performKeyAgreementCOROUTINE$).d9 = function () {
1247
+ var suspendResult = this.x8_1;
1248
+ $sm: do
1249
+ try {
1250
+ var tmp = this.v8_1;
1251
+ switch (tmp) {
1252
+ case 0:
1253
+ this.w8_1 = 4;
1254
+ var command = this.a5r_1.s5k_1;
1255
+ var exec = this.a5r_1.i5k_1;
1256
+ if (!(command == null) && !(exec == null)) {
1257
+ var args = new PerformKeyAgreementArgs(this.b5r_1, this.c5r_1, this.d5r_1, this.e5r_1);
1258
+ this.v8_1 = 3;
1259
+ suspendResult = command.n2j(args, this);
1260
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1261
+ return suspendResult;
1262
+ }
1263
+ continue $sm;
1264
+ } else {
1265
+ this.v8_1 = 1;
1266
+ continue $sm;
1267
+ }
1268
+
1269
+ case 1:
1270
+ this.v8_1 = 2;
1271
+ suspendResult = performKeyAgreementDirect(this.a5r_1, this.b5r_1, this.c5r_1, this.d5r_1, this.e5r_1, this);
1272
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1273
+ return suspendResult;
1274
+ }
1275
+
1276
+ continue $sm;
1277
+ case 2:
1278
+ return suspendResult;
1279
+ case 3:
1280
+ var result = suspendResult;
1281
+ var this_0 = result.a2f_1;
1282
+ var tmp_0;
1283
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
1284
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
1285
+ } else {
1286
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
1287
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Key agreement failed' : tmp0_elvis_lhs);
1288
+ }
1289
+
1290
+ return tmp_0.sharedSecret;
1291
+ case 4:
1292
+ throw this.y8_1;
1293
+ }
1294
+ } catch ($p) {
1295
+ var e = $p;
1296
+ if (this.w8_1 === 4) {
1297
+ throw e;
1298
+ } else {
1299
+ this.v8_1 = this.w8_1;
1300
+ this.y8_1 = e;
1301
+ }
1302
+ }
1303
+ while (true);
1304
+ };
1305
+ function $performKeyAgreement$suspendBridgeCOROUTINE$(_this__u8e3s4, privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, resultContinuation) {
1306
+ CoroutineImpl.call(this, resultContinuation);
1307
+ this.n5r_1 = _this__u8e3s4;
1308
+ this.o5r_1 = privateKeyInfo;
1309
+ this.p5r_1 = publicKeyInfo;
1310
+ this.q5r_1 = algorithm;
1311
+ this.r5r_1 = keyDataLen;
1312
+ }
1313
+ protoOf($performKeyAgreement$suspendBridgeCOROUTINE$).d9 = function () {
1314
+ var suspendResult = this.x8_1;
1315
+ $sm: do
1316
+ try {
1317
+ var tmp = this.v8_1;
1318
+ switch (tmp) {
1319
+ case 0:
1320
+ this.w8_1 = 4;
1321
+ if (this.n5r_1.performKeyAgreement === protoOf(KeyManagerServiceImpl).performKeyAgreement) {
1322
+ this.v8_1 = 2;
1323
+ suspendResult = this.n5r_1.n4d(this.o5r_1, this.p5r_1, this.q5r_1, this.r5r_1, this);
1324
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1325
+ return suspendResult;
1326
+ }
1327
+ continue $sm;
1328
+ } else {
1329
+ this.v8_1 = 1;
1330
+ suspendResult = await_0(this.n5r_1.performKeyAgreement(this.o5r_1, this.p5r_1, this.q5r_1, this.r5r_1), this);
1331
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1332
+ return suspendResult;
1333
+ }
1334
+ continue $sm;
1335
+ }
1336
+
1337
+ case 1:
1338
+ this.s5r_1 = suspendResult;
1339
+ this.v8_1 = 3;
1340
+ continue $sm;
1341
+ case 2:
1342
+ this.s5r_1 = suspendResult;
1343
+ this.v8_1 = 3;
1344
+ continue $sm;
1345
+ case 3:
1346
+ return this.s5r_1;
1347
+ case 4:
1348
+ throw this.y8_1;
1349
+ }
1350
+ } catch ($p) {
1351
+ var e = $p;
1352
+ if (this.w8_1 === 4) {
1353
+ throw e;
1354
+ } else {
1355
+ this.v8_1 = this.w8_1;
1356
+ this.y8_1 = e;
1357
+ }
1358
+ }
1359
+ while (true);
1360
+ };
1361
+ function $storeKeyCOROUTINE$(_this__u8e3s4, keyInfo, providerId, alias, certChain, resultContinuation) {
1362
+ CoroutineImpl.call(this, resultContinuation);
1363
+ this.b5s_1 = _this__u8e3s4;
1364
+ this.c5s_1 = keyInfo;
1365
+ this.d5s_1 = providerId;
1366
+ this.e5s_1 = alias;
1367
+ this.f5s_1 = certChain;
1368
+ }
1369
+ protoOf($storeKeyCOROUTINE$).d9 = function () {
1370
+ var suspendResult = this.x8_1;
1371
+ $sm: do
1372
+ try {
1373
+ var tmp = this.v8_1;
1374
+ switch (tmp) {
1375
+ case 0:
1376
+ this.w8_1 = 4;
1377
+ var command = this.b5s_1.w5k_1;
1378
+ var exec = this.b5s_1.i5k_1;
1379
+ if (!(command == null) && !(exec == null)) {
1380
+ var args = new StoreKeyArgs(this.c5s_1, this.d5s_1, this.e5s_1, this.f5s_1);
1381
+ this.v8_1 = 3;
1382
+ suspendResult = command.n2j(args, this);
1383
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1384
+ return suspendResult;
1385
+ }
1386
+ continue $sm;
1387
+ } else {
1388
+ this.v8_1 = 1;
1389
+ continue $sm;
1390
+ }
1391
+
1392
+ case 1:
1393
+ this.v8_1 = 2;
1394
+ suspendResult = storeKey$virtualSuspendBridge(this.b5s_1.g5s(), this.c5s_1, this.d5s_1, this.e5s_1, this.f5s_1, this);
1395
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1396
+ return suspendResult;
1397
+ }
1398
+
1399
+ continue $sm;
1400
+ case 2:
1401
+ return suspendResult;
1402
+ case 3:
1403
+ var result = suspendResult;
1404
+ var this_0 = result.a2f_1;
1405
+ var tmp_0;
1406
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
1407
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
1408
+ } else {
1409
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
1410
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Store key failed' : tmp0_elvis_lhs);
1411
+ }
1412
+
1413
+ var tmp0_elvis_lhs_0 = tmp_0.key;
1414
+ var tmp_1;
1415
+ if (tmp0_elvis_lhs_0 == null) {
1416
+ throw new PKIException('Store key result is null');
1417
+ } else {
1418
+ tmp_1 = tmp0_elvis_lhs_0;
1419
+ }
1420
+
1421
+ return tmp_1;
1422
+ case 4:
1423
+ throw this.y8_1;
1424
+ }
1425
+ } catch ($p) {
1426
+ var e = $p;
1427
+ if (this.w8_1 === 4) {
1428
+ throw e;
1429
+ } else {
1430
+ this.v8_1 = this.w8_1;
1431
+ this.y8_1 = e;
1432
+ }
1433
+ }
1434
+ while (true);
1435
+ };
1436
+ function $storeKey$suspendBridgeCOROUTINE$(_this__u8e3s4, keyInfo, providerId, alias, certChain, resultContinuation) {
1437
+ CoroutineImpl.call(this, resultContinuation);
1438
+ this.p5s_1 = _this__u8e3s4;
1439
+ this.q5s_1 = keyInfo;
1440
+ this.r5s_1 = providerId;
1441
+ this.s5s_1 = alias;
1442
+ this.t5s_1 = certChain;
1443
+ }
1444
+ protoOf($storeKey$suspendBridgeCOROUTINE$).d9 = function () {
1445
+ var suspendResult = this.x8_1;
1446
+ $sm: do
1447
+ try {
1448
+ var tmp = this.v8_1;
1449
+ switch (tmp) {
1450
+ case 0:
1451
+ this.w8_1 = 4;
1452
+ if (this.p5s_1.storeKey === protoOf(KeyManagerServiceImpl).storeKey) {
1453
+ this.v8_1 = 2;
1454
+ suspendResult = this.p5s_1.x4e(this.q5s_1, this.r5s_1, this.s5s_1, this.t5s_1, this);
1455
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1456
+ return suspendResult;
1457
+ }
1458
+ continue $sm;
1459
+ } else {
1460
+ this.v8_1 = 1;
1461
+ suspendResult = await_0(this.p5s_1.storeKey(this.q5s_1, this.r5s_1, this.s5s_1, this.t5s_1), this);
1462
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1463
+ return suspendResult;
1464
+ }
1465
+ continue $sm;
1466
+ }
1467
+
1468
+ case 1:
1469
+ this.u5s_1 = suspendResult;
1470
+ this.v8_1 = 3;
1471
+ continue $sm;
1472
+ case 2:
1473
+ this.u5s_1 = suspendResult;
1474
+ this.v8_1 = 3;
1475
+ continue $sm;
1476
+ case 3:
1477
+ return this.u5s_1;
1478
+ case 4:
1479
+ throw this.y8_1;
1480
+ }
1481
+ } catch ($p) {
1482
+ var e = $p;
1483
+ if (this.w8_1 === 4) {
1484
+ throw e;
1485
+ } else {
1486
+ this.v8_1 = this.w8_1;
1487
+ this.y8_1 = e;
1488
+ }
1489
+ }
1490
+ while (true);
1491
+ };
1492
+ function $listKeysCOROUTINE$(_this__u8e3s4, resultContinuation) {
1493
+ CoroutineImpl.call(this, resultContinuation);
1494
+ this.d5t_1 = _this__u8e3s4;
1495
+ }
1496
+ protoOf($listKeysCOROUTINE$).d9 = function () {
1497
+ var suspendResult = this.x8_1;
1498
+ $sm: do
1499
+ try {
1500
+ var tmp = this.v8_1;
1501
+ switch (tmp) {
1502
+ case 0:
1503
+ this.w8_1 = 4;
1504
+ var command = this.d5t_1.u5k_1;
1505
+ var exec = this.d5t_1.i5k_1;
1506
+ if (!(command == null) && !(exec == null)) {
1507
+ var args = new ListKeysArgs();
1508
+ this.v8_1 = 3;
1509
+ suspendResult = command.n2j(args, this);
1510
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1511
+ return suspendResult;
1512
+ }
1513
+ continue $sm;
1514
+ } else {
1515
+ this.v8_1 = 1;
1516
+ continue $sm;
1517
+ }
1518
+
1519
+ case 1:
1520
+ this.v8_1 = 2;
1521
+ suspendResult = listKeys$virtualSuspendBridge(this.d5t_1.g5s(), this);
1522
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1523
+ return suspendResult;
1524
+ }
1525
+
1526
+ continue $sm;
1527
+ case 2:
1528
+ return suspendResult;
1529
+ case 3:
1530
+ var result = suspendResult;
1531
+ var this_0 = result.a2f_1;
1532
+ var tmp_0;
1533
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
1534
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
1535
+ } else {
1536
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
1537
+ throw new PKIException(tmp0_elvis_lhs == null ? 'List keys failed' : tmp0_elvis_lhs);
1538
+ }
1539
+
1540
+ return tmp_0.keys;
1541
+ case 4:
1542
+ throw this.y8_1;
1543
+ }
1544
+ } catch ($p) {
1545
+ var e = $p;
1546
+ if (this.w8_1 === 4) {
1547
+ throw e;
1548
+ } else {
1549
+ this.v8_1 = this.w8_1;
1550
+ this.y8_1 = e;
1551
+ }
1552
+ }
1553
+ while (true);
1554
+ };
1555
+ function $listKeys$suspendBridgeCOROUTINE$(_this__u8e3s4, resultContinuation) {
1556
+ CoroutineImpl.call(this, resultContinuation);
1557
+ this.m5t_1 = _this__u8e3s4;
1558
+ }
1559
+ protoOf($listKeys$suspendBridgeCOROUTINE$).d9 = function () {
1560
+ var suspendResult = this.x8_1;
1561
+ $sm: do
1562
+ try {
1563
+ var tmp = this.v8_1;
1564
+ switch (tmp) {
1565
+ case 0:
1566
+ this.w8_1 = 4;
1567
+ if (this.m5t_1.listKeys === protoOf(KeyManagerServiceImpl).listKeys) {
1568
+ this.v8_1 = 2;
1569
+ suspendResult = this.m5t_1.c4i(this);
1570
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1571
+ return suspendResult;
1572
+ }
1573
+ continue $sm;
1574
+ } else {
1575
+ this.v8_1 = 1;
1576
+ suspendResult = await_0(this.m5t_1.listKeys(), this);
1577
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1578
+ return suspendResult;
1579
+ }
1580
+ continue $sm;
1581
+ }
1582
+
1583
+ case 1:
1584
+ this.n5t_1 = suspendResult;
1585
+ this.v8_1 = 3;
1586
+ continue $sm;
1587
+ case 2:
1588
+ this.n5t_1 = suspendResult;
1589
+ this.v8_1 = 3;
1590
+ continue $sm;
1591
+ case 3:
1592
+ return this.n5t_1;
1593
+ case 4:
1594
+ throw this.y8_1;
1595
+ }
1596
+ } catch ($p) {
1597
+ var e = $p;
1598
+ if (this.w8_1 === 4) {
1599
+ throw e;
1600
+ } else {
1601
+ this.v8_1 = this.w8_1;
1602
+ this.y8_1 = e;
1603
+ }
1604
+ }
1605
+ while (true);
1606
+ };
1607
+ function $listKeys$suspendBridgeCOROUTINE$_0(_this__u8e3s4, filter, resultContinuation) {
1608
+ CoroutineImpl.call(this, resultContinuation);
1609
+ this.w5t_1 = _this__u8e3s4;
1610
+ this.y5t_1 = filter;
1611
+ }
1612
+ protoOf($listKeys$suspendBridgeCOROUTINE$_0).d9 = function () {
1613
+ var suspendResult = this.x8_1;
1614
+ $sm: do
1615
+ try {
1616
+ var tmp = this.v8_1;
1617
+ switch (tmp) {
1618
+ case 0:
1619
+ this.w8_1 = 4;
1620
+ if (this.w5t_1.listKeysFiltered === protoOf(KeyManagerServiceImpl).listKeysFiltered) {
1621
+ this.v8_1 = 2;
1622
+ suspendResult = this.w5t_1.d4i(this.y5t_1, this);
1623
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1624
+ return suspendResult;
1625
+ }
1626
+ continue $sm;
1627
+ } else {
1628
+ this.v8_1 = 1;
1629
+ suspendResult = await_0(this.w5t_1.listKeysFiltered(this.y5t_1), this);
1630
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1631
+ return suspendResult;
1632
+ }
1633
+ continue $sm;
1634
+ }
1635
+
1636
+ case 1:
1637
+ this.z5t_1 = suspendResult;
1638
+ this.v8_1 = 3;
1639
+ continue $sm;
1640
+ case 2:
1641
+ this.z5t_1 = suspendResult;
1642
+ this.v8_1 = 3;
1643
+ continue $sm;
1644
+ case 3:
1645
+ return this.z5t_1;
1646
+ case 4:
1647
+ throw this.y8_1;
1648
+ }
1649
+ } catch ($p) {
1650
+ var e = $p;
1651
+ if (this.w8_1 === 4) {
1652
+ throw e;
1653
+ } else {
1654
+ this.v8_1 = this.w8_1;
1655
+ this.y8_1 = e;
1656
+ }
1657
+ }
1658
+ while (true);
1659
+ };
1660
+ function $getKeyCOROUTINE$(_this__u8e3s4, keyInfo, resultContinuation) {
1661
+ CoroutineImpl.call(this, resultContinuation);
1662
+ this.i5u_1 = _this__u8e3s4;
1663
+ this.j5u_1 = keyInfo;
1664
+ }
1665
+ protoOf($getKeyCOROUTINE$).d9 = function () {
1666
+ var suspendResult = this.x8_1;
1667
+ $sm: do
1668
+ try {
1669
+ var tmp = this.v8_1;
1670
+ switch (tmp) {
1671
+ case 0:
1672
+ this.w8_1 = 4;
1673
+ var command = this.i5u_1.v5k_1;
1674
+ var exec = this.i5u_1.i5k_1;
1675
+ if (!(command == null) && !(exec == null)) {
1676
+ var args = new GetKeyArgs(this.j5u_1);
1677
+ this.v8_1 = 3;
1678
+ suspendResult = command.n2j(args, this);
1679
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1680
+ return suspendResult;
1681
+ }
1682
+ continue $sm;
1683
+ } else {
1684
+ this.v8_1 = 1;
1685
+ continue $sm;
1686
+ }
1687
+
1688
+ case 1:
1689
+ this.v8_1 = 2;
1690
+ suspendResult = getKey$virtualSuspendBridge(this.i5u_1.g5s(), this.j5u_1, this);
1691
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1692
+ return suspendResult;
1693
+ }
1694
+
1695
+ continue $sm;
1696
+ case 2:
1697
+ return suspendResult;
1698
+ case 3:
1699
+ var result = suspendResult;
1700
+ var this_0 = result.a2f_1;
1701
+ var tmp_0;
1702
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
1703
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
1704
+ } else {
1705
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
1706
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Get key failed' : tmp0_elvis_lhs);
1707
+ }
1708
+
1709
+ var tmp0_elvis_lhs_0 = tmp_0.key;
1710
+ var tmp_1;
1711
+ if (tmp0_elvis_lhs_0 == null) {
1712
+ throw new PKIException('Get key result is null');
1713
+ } else {
1714
+ tmp_1 = tmp0_elvis_lhs_0;
1715
+ }
1716
+
1717
+ return tmp_1;
1718
+ case 4:
1719
+ throw this.y8_1;
1720
+ }
1721
+ } catch ($p) {
1722
+ var e = $p;
1723
+ if (this.w8_1 === 4) {
1724
+ throw e;
1725
+ } else {
1726
+ this.v8_1 = this.w8_1;
1727
+ this.y8_1 = e;
1728
+ }
1729
+ }
1730
+ while (true);
1731
+ };
1732
+ function $getKey$suspendBridgeCOROUTINE$(_this__u8e3s4, keyInfo, resultContinuation) {
1733
+ CoroutineImpl.call(this, resultContinuation);
1734
+ this.s5u_1 = _this__u8e3s4;
1735
+ this.t5u_1 = keyInfo;
1736
+ }
1737
+ protoOf($getKey$suspendBridgeCOROUTINE$).d9 = function () {
1738
+ var suspendResult = this.x8_1;
1739
+ $sm: do
1740
+ try {
1741
+ var tmp = this.v8_1;
1742
+ switch (tmp) {
1743
+ case 0:
1744
+ this.w8_1 = 4;
1745
+ if (this.s5u_1.getKey === protoOf(KeyManagerServiceImpl).getKey) {
1746
+ this.v8_1 = 2;
1747
+ suspendResult = this.s5u_1.e4i(this.t5u_1, this);
1748
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1749
+ return suspendResult;
1750
+ }
1751
+ continue $sm;
1752
+ } else {
1753
+ this.v8_1 = 1;
1754
+ suspendResult = await_0(this.s5u_1.getKey(this.t5u_1), this);
1755
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1756
+ return suspendResult;
1757
+ }
1758
+ continue $sm;
1759
+ }
1760
+
1761
+ case 1:
1762
+ this.u5u_1 = suspendResult;
1763
+ this.v8_1 = 3;
1764
+ continue $sm;
1765
+ case 2:
1766
+ this.u5u_1 = suspendResult;
1767
+ this.v8_1 = 3;
1768
+ continue $sm;
1769
+ case 3:
1770
+ return this.u5u_1;
1771
+ case 4:
1772
+ throw this.y8_1;
1773
+ }
1774
+ } catch ($p) {
1775
+ var e = $p;
1776
+ if (this.w8_1 === 4) {
1777
+ throw e;
1778
+ } else {
1779
+ this.v8_1 = this.w8_1;
1780
+ this.y8_1 = e;
1781
+ }
1782
+ }
1783
+ while (true);
1784
+ };
1785
+ function $deleteKeyCOROUTINE$(_this__u8e3s4, keyInfo, resultContinuation) {
1786
+ CoroutineImpl.call(this, resultContinuation);
1787
+ this.e5v_1 = _this__u8e3s4;
1788
+ this.f5v_1 = keyInfo;
1789
+ }
1790
+ protoOf($deleteKeyCOROUTINE$).d9 = function () {
1791
+ var suspendResult = this.x8_1;
1792
+ $sm: do
1793
+ try {
1794
+ var tmp = this.v8_1;
1795
+ switch (tmp) {
1796
+ case 0:
1797
+ this.w8_1 = 4;
1798
+ var command = this.e5v_1.x5k_1;
1799
+ var exec = this.e5v_1.i5k_1;
1800
+ if (!(command == null) && !(exec == null)) {
1801
+ var args = new DeleteKeyArgs(this.f5v_1);
1802
+ this.v8_1 = 3;
1803
+ suspendResult = command.n2j(args, this);
1804
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1805
+ return suspendResult;
1806
+ }
1807
+ continue $sm;
1808
+ } else {
1809
+ this.v8_1 = 1;
1810
+ continue $sm;
1811
+ }
1812
+
1813
+ case 1:
1814
+ this.v8_1 = 2;
1815
+ suspendResult = deleteKey$virtualSuspendBridge(this.e5v_1.g5s(), this.f5v_1, this);
1816
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1817
+ return suspendResult;
1818
+ }
1819
+
1820
+ continue $sm;
1821
+ case 2:
1822
+ return suspendResult;
1823
+ case 3:
1824
+ var result = suspendResult;
1825
+ var this_0 = result.a2f_1;
1826
+ var tmp_0;
1827
+ if (_Result___get_isOk__impl__qbhaup(this_0)) {
1828
+ tmp_0 = _Result___get_value__impl__bjfvqg(this_0);
1829
+ } else {
1830
+ var tmp0_elvis_lhs = _Result___get_error__impl__ihqhun(this_0).message.defaultMessage;
1831
+ throw new PKIException(tmp0_elvis_lhs == null ? 'Delete key failed' : tmp0_elvis_lhs);
1832
+ }
1833
+
1834
+ return tmp_0.deleted;
1835
+ case 4:
1836
+ throw this.y8_1;
1837
+ }
1838
+ } catch ($p) {
1839
+ var e = $p;
1840
+ if (this.w8_1 === 4) {
1841
+ throw e;
1842
+ } else {
1843
+ this.v8_1 = this.w8_1;
1844
+ this.y8_1 = e;
1845
+ }
1846
+ }
1847
+ while (true);
1848
+ };
1849
+ function $deleteKey$suspendBridgeCOROUTINE$(_this__u8e3s4, keyInfo, resultContinuation) {
1850
+ CoroutineImpl.call(this, resultContinuation);
1851
+ this.o5v_1 = _this__u8e3s4;
1852
+ this.p5v_1 = keyInfo;
1853
+ }
1854
+ protoOf($deleteKey$suspendBridgeCOROUTINE$).d9 = function () {
1855
+ var suspendResult = this.x8_1;
1856
+ $sm: do
1857
+ try {
1858
+ var tmp = this.v8_1;
1859
+ switch (tmp) {
1860
+ case 0:
1861
+ this.w8_1 = 4;
1862
+ if (this.o5v_1.deleteKey === protoOf(KeyManagerServiceImpl).deleteKey) {
1863
+ this.v8_1 = 2;
1864
+ suspendResult = this.o5v_1.g4i(this.p5v_1, this);
1865
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1866
+ return suspendResult;
1867
+ }
1868
+ continue $sm;
1869
+ } else {
1870
+ this.v8_1 = 1;
1871
+ suspendResult = await_0(this.o5v_1.deleteKey(this.p5v_1), this);
1872
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1873
+ return suspendResult;
1874
+ }
1875
+ continue $sm;
1876
+ }
1877
+
1878
+ case 1:
1879
+ this.q5v_1 = suspendResult;
1880
+ this.v8_1 = 3;
1881
+ continue $sm;
1882
+ case 2:
1883
+ this.q5v_1 = suspendResult;
1884
+ this.v8_1 = 3;
1885
+ continue $sm;
1886
+ case 3:
1887
+ return this.q5v_1;
1888
+ case 4:
1889
+ throw this.y8_1;
1890
+ }
1891
+ } catch ($p) {
1892
+ var e = $p;
1893
+ if (this.w8_1 === 4) {
1894
+ throw e;
1895
+ } else {
1896
+ this.v8_1 = this.w8_1;
1897
+ this.y8_1 = e;
1898
+ }
1899
+ }
1900
+ while (true);
1901
+ };
1902
+ function KeyManagerServiceImpl(providerRegistry, resolverRegistry, keyStoreService, execution, queryProviderCommand, queryProvidersCommand, getAllCapabilitiesCommand, createRawSignatureCommand, verifyRawSignatureCommand, encryptCommand, decryptCommand, wrapKeyCommand, unwrapKeyCommand, performKeyAgreementCommand, generateKeyCommand, listKeysCommand, getKeyCommand, storeKeyCommand, deleteKeyCommand, resolvePublicKeyCommand) {
1903
+ this.f5k_1 = providerRegistry;
1904
+ this.g5k_1 = resolverRegistry;
1905
+ this.h5k_1 = keyStoreService;
1906
+ this.i5k_1 = execution;
1907
+ this.j5k_1 = queryProviderCommand;
1908
+ this.k5k_1 = queryProvidersCommand;
1909
+ this.l5k_1 = getAllCapabilitiesCommand;
1910
+ this.m5k_1 = createRawSignatureCommand;
1911
+ this.n5k_1 = verifyRawSignatureCommand;
1912
+ this.o5k_1 = encryptCommand;
1913
+ this.p5k_1 = decryptCommand;
1914
+ this.q5k_1 = wrapKeyCommand;
1915
+ this.r5k_1 = unwrapKeyCommand;
1916
+ this.s5k_1 = performKeyAgreementCommand;
1917
+ this.t5k_1 = generateKeyCommand;
1918
+ this.u5k_1 = listKeysCommand;
1919
+ this.v5k_1 = getKeyCommand;
1920
+ this.w5k_1 = storeKeyCommand;
1921
+ this.x5k_1 = deleteKeyCommand;
1922
+ this.y5k_1 = resolvePublicKeyCommand;
1923
+ }
1924
+ protoOf(KeyManagerServiceImpl).g5s = function () {
1925
+ return this.h5k_1;
1926
+ };
1927
+ protoOf(KeyManagerServiceImpl).defaultProviderId = function () {
1928
+ return this.f5k_1.defaultProviderId();
1929
+ };
1930
+ protoOf(KeyManagerServiceImpl).getProviderIds = function () {
1931
+ return this.f5k_1.getProviderIds();
1932
+ };
1933
+ protoOf(KeyManagerServiceImpl).u4l = function (id) {
1934
+ return this.f5k_1.getProviderById(id);
1935
+ };
1936
+ protoOf(KeyManagerServiceImpl).v4l = function (providerId, alg) {
1937
+ return this.f5k_1.getProvider(providerId, alg);
1938
+ };
1939
+ protoOf(KeyManagerServiceImpl).getKmsBySignatureAlgorithm = function (signatureAlgorithm) {
1940
+ return this.f5k_1.getKmsBySignatureAlgorithm(signatureAlgorithm);
1941
+ };
1942
+ protoOf(KeyManagerServiceImpl).w4l = function (provider, makeDefaultKms) {
1943
+ return this.f5k_1.registerProvider(provider, makeDefaultKms);
1944
+ };
1945
+ protoOf(KeyManagerServiceImpl).defaultResolverId = function () {
1946
+ return this.g5k_1.defaultResolverId();
1947
+ };
1948
+ protoOf(KeyManagerServiceImpl).getResolverIds = function () {
1949
+ return this.g5k_1.getResolverIds();
1950
+ };
1951
+ protoOf(KeyManagerServiceImpl).y4e = function (id) {
1952
+ return this.g5k_1.getResolverById(id);
1953
+ };
1954
+ protoOf(KeyManagerServiceImpl).z4e = function (identifierMethod, keyType, resolverId) {
1955
+ return this.g5k_1.getResolverByKeyTypeOrIdentifier(identifierMethod, keyType, resolverId);
1956
+ };
1957
+ protoOf(KeyManagerServiceImpl).a4f = function (resolver, makeDefaultResolver) {
1958
+ return this.g5k_1.registerResolver(resolver, makeDefaultResolver);
1959
+ };
1960
+ protoOf(KeyManagerServiceImpl).r5v = function (query, $completion) {
1961
+ var tmp0_elvis_lhs = this.j5k_1;
1962
+ var tmp;
1963
+ if (tmp0_elvis_lhs == null) {
1964
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'QueryProviderCommand', 'Command not available'));
1965
+ } else {
1966
+ tmp = tmp0_elvis_lhs;
1967
+ }
1968
+ var command = tmp;
1969
+ var tmp1_elvis_lhs = this.i5k_1;
1970
+ var tmp_0;
1971
+ if (tmp1_elvis_lhs == null) {
1972
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
1973
+ } else {
1974
+ tmp_0 = tmp1_elvis_lhs;
1975
+ }
1976
+ var exec = tmp_0;
1977
+ var args = new QueryProviderArgs(query);
1978
+ return command.n2j(args, $completion);
1979
+ };
1980
+ protoOf(KeyManagerServiceImpl).s5v = function (query, $completion) {
1981
+ var tmp0_elvis_lhs = this.k5k_1;
1982
+ var tmp;
1983
+ if (tmp0_elvis_lhs == null) {
1984
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'QueryProvidersCommand', 'Command not available'));
1985
+ } else {
1986
+ tmp = tmp0_elvis_lhs;
1987
+ }
1988
+ var command = tmp;
1989
+ var tmp1_elvis_lhs = this.i5k_1;
1990
+ var tmp_0;
1991
+ if (tmp1_elvis_lhs == null) {
1992
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
1993
+ } else {
1994
+ tmp_0 = tmp1_elvis_lhs;
1995
+ }
1996
+ var exec = tmp_0;
1997
+ var args = new QueryProvidersArgs(query);
1998
+ return command.n2j(args, $completion);
1999
+ };
2000
+ protoOf(KeyManagerServiceImpl).a4e = function (includeDisabled, $completion) {
2001
+ var tmp0_elvis_lhs = this.l5k_1;
2002
+ var tmp;
2003
+ if (tmp0_elvis_lhs == null) {
2004
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'GetAllCapabilitiesCommand', 'Command not available'));
2005
+ } else {
2006
+ tmp = tmp0_elvis_lhs;
2007
+ }
2008
+ var command = tmp;
2009
+ var tmp1_elvis_lhs = this.i5k_1;
2010
+ var tmp_0;
2011
+ if (tmp1_elvis_lhs == null) {
2012
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2013
+ } else {
2014
+ tmp_0 = tmp1_elvis_lhs;
2015
+ }
2016
+ var exec = tmp_0;
2017
+ var args = new GetAllCapabilitiesArgs(includeDisabled);
2018
+ return command.n2j(args, $completion);
2019
+ };
2020
+ protoOf(KeyManagerServiceImpl).b4f = function (keyInfo, identifierMethod, trustedCerts, verifyX509CertificateChain, $completion) {
2021
+ var tmp = new $resolvePublicKeyCOROUTINE$(this, keyInfo, identifierMethod, trustedCerts, verifyX509CertificateChain, $completion);
2022
+ tmp.x8_1 = Unit_instance;
2023
+ tmp.y8_1 = null;
2024
+ return tmp.d9();
2025
+ };
2026
+ protoOf(KeyManagerServiceImpl).e4e = function (providerId, alias, use, keyOperations, alg, keyVisibility, $completion) {
2027
+ var tmp = new $generateKeyCOROUTINE$(this, providerId, alias, use, keyOperations, alg, keyVisibility, $completion);
2028
+ tmp.x8_1 = Unit_instance;
2029
+ tmp.y8_1 = null;
2030
+ return tmp.d9();
2031
+ };
2032
+ protoOf(KeyManagerServiceImpl).c4e = function (providerId, alias, use, keyOperations, alg, keyVisibility, $completion) {
2033
+ return this.e4e(providerId, alias, use, keyOperations, alg, keyVisibility, $completion);
2034
+ };
2035
+ protoOf(KeyManagerServiceImpl).p4n = function (keyInfo, input, requireX5Chain, $completion) {
2036
+ var tmp = new $createRawSignatureCOROUTINE$(this, keyInfo, input, requireX5Chain, $completion);
2037
+ tmp.x8_1 = Unit_instance;
2038
+ tmp.y8_1 = null;
2039
+ return tmp.d9();
2040
+ };
2041
+ protoOf(KeyManagerServiceImpl).q4n = function (keyInfo, input, signature, $completion) {
2042
+ var tmp = new $isValidRawSignatureCOROUTINE$(this, keyInfo, input, signature, $completion);
2043
+ tmp.x8_1 = Unit_instance;
2044
+ tmp.y8_1 = null;
2045
+ return tmp.d9();
2046
+ };
2047
+ protoOf(KeyManagerServiceImpl).g4d = function (keyInfo, plaintext, algorithm, additionalAuthenticatedData, $completion) {
2048
+ var tmp = new $encryptCOROUTINE$(this, keyInfo, plaintext, algorithm, additionalAuthenticatedData, $completion);
2049
+ tmp.x8_1 = Unit_instance;
2050
+ tmp.y8_1 = null;
2051
+ return tmp.d9();
2052
+ };
2053
+ protoOf(KeyManagerServiceImpl).encrypt = function (keyInfo, plaintext, algorithm, additionalAuthenticatedData) {
2054
+ var tmp = this;
2055
+ return promisify(function ($completion) {
2056
+ return tmp.h4d(keyInfo, plaintext, algorithm, additionalAuthenticatedData, $completion);
2057
+ });
2058
+ };
2059
+ protoOf(KeyManagerServiceImpl).c4d = function (keyInfo, plaintext, algorithm, additionalAuthenticatedData, $completion) {
2060
+ var tmp = new $encrypt$suspendBridgeCOROUTINE$(this, keyInfo, plaintext, algorithm, additionalAuthenticatedData, $completion);
2061
+ tmp.x8_1 = Unit_instance;
2062
+ tmp.y8_1 = null;
2063
+ return tmp.d9();
2064
+ };
2065
+ protoOf(KeyManagerServiceImpl).i4d = function (keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, $completion) {
2066
+ var tmp = new $decryptCOROUTINE$(this, keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, $completion);
2067
+ tmp.x8_1 = Unit_instance;
2068
+ tmp.y8_1 = null;
2069
+ return tmp.d9();
2070
+ };
2071
+ protoOf(KeyManagerServiceImpl).decrypt = function (keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData) {
2072
+ var tmp = this;
2073
+ return promisify(function ($completion) {
2074
+ return tmp.j4d(keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, $completion);
2075
+ });
2076
+ };
2077
+ protoOf(KeyManagerServiceImpl).d4d = function (keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, $completion) {
2078
+ var tmp = new $decrypt$suspendBridgeCOROUTINE$(this, keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, $completion);
2079
+ tmp.x8_1 = Unit_instance;
2080
+ tmp.y8_1 = null;
2081
+ return tmp.d9();
2082
+ };
2083
+ protoOf(KeyManagerServiceImpl).k4d = function (wrappingKeyInfo, keyToWrap, algorithm, $completion) {
2084
+ var tmp = new $wrapKeyCOROUTINE$(this, wrappingKeyInfo, keyToWrap, algorithm, $completion);
2085
+ tmp.x8_1 = Unit_instance;
2086
+ tmp.y8_1 = null;
2087
+ return tmp.d9();
2088
+ };
2089
+ protoOf(KeyManagerServiceImpl).wrapKey = function (wrappingKeyInfo, keyToWrap, algorithm) {
2090
+ var tmp = this;
2091
+ return promisify(function ($completion) {
2092
+ return tmp.k4d(wrappingKeyInfo, keyToWrap, algorithm, $completion);
2093
+ });
2094
+ };
2095
+ protoOf(KeyManagerServiceImpl).e4d = function (wrappingKeyInfo, keyToWrap, algorithm, $completion) {
2096
+ var tmp = new $wrapKey$suspendBridgeCOROUTINE$(this, wrappingKeyInfo, keyToWrap, algorithm, $completion);
2097
+ tmp.x8_1 = Unit_instance;
2098
+ tmp.y8_1 = null;
2099
+ return tmp.d9();
2100
+ };
2101
+ protoOf(KeyManagerServiceImpl).l4d = function (unwrappingKeyInfo, wrappedKey, algorithm, $completion) {
2102
+ var tmp = new $unwrapKeyCOROUTINE$(this, unwrappingKeyInfo, wrappedKey, algorithm, $completion);
2103
+ tmp.x8_1 = Unit_instance;
2104
+ tmp.y8_1 = null;
2105
+ return tmp.d9();
2106
+ };
2107
+ protoOf(KeyManagerServiceImpl).unwrapKey = function (unwrappingKeyInfo, wrappedKey, algorithm) {
2108
+ var tmp = this;
2109
+ return promisify(function ($completion) {
2110
+ return tmp.l4d(unwrappingKeyInfo, wrappedKey, algorithm, $completion);
2111
+ });
2112
+ };
2113
+ protoOf(KeyManagerServiceImpl).f4d = function (unwrappingKeyInfo, wrappedKey, algorithm, $completion) {
2114
+ var tmp = new $unwrapKey$suspendBridgeCOROUTINE$(this, unwrappingKeyInfo, wrappedKey, algorithm, $completion);
2115
+ tmp.x8_1 = Unit_instance;
2116
+ tmp.y8_1 = null;
2117
+ return tmp.d9();
2118
+ };
2119
+ protoOf(KeyManagerServiceImpl).m4d = function (privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, $completion) {
2120
+ var tmp = new $performKeyAgreementCOROUTINE$(this, privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, $completion);
2121
+ tmp.x8_1 = Unit_instance;
2122
+ tmp.y8_1 = null;
2123
+ return tmp.d9();
2124
+ };
2125
+ protoOf(KeyManagerServiceImpl).performKeyAgreement = function (privateKeyInfo, publicKeyInfo, algorithm, keyDataLen) {
2126
+ var tmp = this;
2127
+ return promisify(function ($completion) {
2128
+ return tmp.n4d(privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, $completion);
2129
+ });
2130
+ };
2131
+ protoOf(KeyManagerServiceImpl).o4d = function (privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, $completion) {
2132
+ var tmp = new $performKeyAgreement$suspendBridgeCOROUTINE$(this, privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, $completion);
2133
+ tmp.x8_1 = Unit_instance;
2134
+ tmp.y8_1 = null;
2135
+ return tmp.d9();
2136
+ };
2137
+ protoOf(KeyManagerServiceImpl).f4i = function (keyInfo, providerId, alias, certChain, $completion) {
2138
+ var tmp = new $storeKeyCOROUTINE$(this, keyInfo, providerId, alias, certChain, $completion);
2139
+ tmp.x8_1 = Unit_instance;
2140
+ tmp.y8_1 = null;
2141
+ return tmp.d9();
2142
+ };
2143
+ protoOf(KeyManagerServiceImpl).storeKey = function (keyInfo, providerId, alias, certChain) {
2144
+ var tmp = this;
2145
+ return promisify(function ($completion) {
2146
+ return tmp.x4e(keyInfo, providerId, alias, certChain, $completion);
2147
+ });
2148
+ };
2149
+ protoOf(KeyManagerServiceImpl).z4h = function (keyInfo, providerId, alias, certChain, $completion) {
2150
+ var tmp = new $storeKey$suspendBridgeCOROUTINE$(this, keyInfo, providerId, alias, certChain, $completion);
2151
+ tmp.x8_1 = Unit_instance;
2152
+ tmp.y8_1 = null;
2153
+ return tmp.d9();
2154
+ };
2155
+ protoOf(KeyManagerServiceImpl).b4i = function () {
2156
+ return this.g5s().settings;
2157
+ };
2158
+ protoOf(KeyManagerServiceImpl).c4i = function ($completion) {
2159
+ var tmp = new $listKeysCOROUTINE$(this, $completion);
2160
+ tmp.x8_1 = Unit_instance;
2161
+ tmp.y8_1 = null;
2162
+ return tmp.d9();
2163
+ };
2164
+ protoOf(KeyManagerServiceImpl).listKeys = function () {
2165
+ var tmp = this;
2166
+ return promisify(function ($completion) {
2167
+ return tmp.c4i($completion);
2168
+ });
2169
+ };
2170
+ protoOf(KeyManagerServiceImpl).h4h = function ($completion) {
2171
+ var tmp = new $listKeys$suspendBridgeCOROUTINE$(this, $completion);
2172
+ tmp.x8_1 = Unit_instance;
2173
+ tmp.y8_1 = null;
2174
+ return tmp.d9();
2175
+ };
2176
+ protoOf(KeyManagerServiceImpl).d4i = function (filter, $completion) {
2177
+ return listKeys$virtualSuspendBridge_0(this.g5s(), filter, $completion);
2178
+ };
2179
+ protoOf(KeyManagerServiceImpl).listKeysFiltered = function (filter) {
2180
+ var tmp = this;
2181
+ return promisify(function ($completion) {
2182
+ return tmp.d4i(filter, $completion);
2183
+ });
2184
+ };
2185
+ protoOf(KeyManagerServiceImpl).x4h = function (filter, $completion) {
2186
+ var tmp = new $listKeys$suspendBridgeCOROUTINE$_0(this, filter, $completion);
2187
+ tmp.x8_1 = Unit_instance;
2188
+ tmp.y8_1 = null;
2189
+ return tmp.d9();
2190
+ };
2191
+ protoOf(KeyManagerServiceImpl).e4i = function (keyInfo, $completion) {
2192
+ var tmp = new $getKeyCOROUTINE$(this, keyInfo, $completion);
2193
+ tmp.x8_1 = Unit_instance;
2194
+ tmp.y8_1 = null;
2195
+ return tmp.d9();
2196
+ };
2197
+ protoOf(KeyManagerServiceImpl).getKey = function (keyInfo) {
2198
+ var tmp = this;
2199
+ return promisify(function ($completion) {
2200
+ return tmp.e4i(keyInfo, $completion);
2201
+ });
2202
+ };
2203
+ protoOf(KeyManagerServiceImpl).y4h = function (keyInfo, $completion) {
2204
+ var tmp = new $getKey$suspendBridgeCOROUTINE$(this, keyInfo, $completion);
2205
+ tmp.x8_1 = Unit_instance;
2206
+ tmp.y8_1 = null;
2207
+ return tmp.d9();
2208
+ };
2209
+ protoOf(KeyManagerServiceImpl).g4i = function (keyInfo, $completion) {
2210
+ var tmp = new $deleteKeyCOROUTINE$(this, keyInfo, $completion);
2211
+ tmp.x8_1 = Unit_instance;
2212
+ tmp.y8_1 = null;
2213
+ return tmp.d9();
2214
+ };
2215
+ protoOf(KeyManagerServiceImpl).deleteKey = function (keyInfo) {
2216
+ var tmp = this;
2217
+ return promisify(function ($completion) {
2218
+ return tmp.g4i(keyInfo, $completion);
2219
+ });
2220
+ };
2221
+ protoOf(KeyManagerServiceImpl).a4i = function (keyInfo, $completion) {
2222
+ var tmp = new $deleteKey$suspendBridgeCOROUTINE$(this, keyInfo, $completion);
2223
+ tmp.x8_1 = Unit_instance;
2224
+ tmp.y8_1 = null;
2225
+ return tmp.d9();
2226
+ };
2227
+ protoOf(KeyManagerServiceImpl).keyVisibility = function () {
2228
+ return this.g5s().keyVisibility();
2229
+ };
2230
+ protoOf(KeyManagerServiceImpl).g4e = function (keyInfo, input, requireX5Chain, $completion) {
2231
+ var tmp0_elvis_lhs = this.m5k_1;
2232
+ var tmp;
2233
+ if (tmp0_elvis_lhs == null) {
2234
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'CreateRawSignatureCommand', 'Command not available'));
2235
+ } else {
2236
+ tmp = tmp0_elvis_lhs;
2237
+ }
2238
+ var command = tmp;
2239
+ var tmp1_elvis_lhs = this.i5k_1;
2240
+ var tmp_0;
2241
+ if (tmp1_elvis_lhs == null) {
2242
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2243
+ } else {
2244
+ tmp_0 = tmp1_elvis_lhs;
2245
+ }
2246
+ var exec = tmp_0;
2247
+ var args = new CreateRawSignatureArgs(keyInfo, input, requireX5Chain);
2248
+ return command.n2j(args, $completion);
2249
+ };
2250
+ protoOf(KeyManagerServiceImpl).t5v = function (keyInfo, input, signature, $completion) {
2251
+ var tmp0_elvis_lhs = this.n5k_1;
2252
+ var tmp;
2253
+ if (tmp0_elvis_lhs == null) {
2254
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'VerifyRawSignatureCommand', 'Command not available'));
2255
+ } else {
2256
+ tmp = tmp0_elvis_lhs;
2257
+ }
2258
+ var command = tmp;
2259
+ var tmp1_elvis_lhs = this.i5k_1;
2260
+ var tmp_0;
2261
+ if (tmp1_elvis_lhs == null) {
2262
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2263
+ } else {
2264
+ tmp_0 = tmp1_elvis_lhs;
2265
+ }
2266
+ var exec = tmp_0;
2267
+ var args = new VerifyRawSignatureArgs(keyInfo, input, signature);
2268
+ return command.n2j(args, $completion);
2269
+ };
2270
+ protoOf(KeyManagerServiceImpl).i4e = function (keyInfo, plaintext, algorithm, additionalAuthenticatedData, $completion) {
2271
+ var tmp0_elvis_lhs = this.o5k_1;
2272
+ var tmp;
2273
+ if (tmp0_elvis_lhs == null) {
2274
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'EncryptCommand', 'Command not available'));
2275
+ } else {
2276
+ tmp = tmp0_elvis_lhs;
2277
+ }
2278
+ var command = tmp;
2279
+ var tmp1_elvis_lhs = this.i5k_1;
2280
+ var tmp_0;
2281
+ if (tmp1_elvis_lhs == null) {
2282
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2283
+ } else {
2284
+ tmp_0 = tmp1_elvis_lhs;
2285
+ }
2286
+ var exec = tmp_0;
2287
+ var args = new EncryptArgs(keyInfo, plaintext, algorithm, additionalAuthenticatedData);
2288
+ return command.n2j(args, $completion);
2289
+ };
2290
+ protoOf(KeyManagerServiceImpl).k4e = function (keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData, $completion) {
2291
+ var tmp0_elvis_lhs = this.p5k_1;
2292
+ var tmp;
2293
+ if (tmp0_elvis_lhs == null) {
2294
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'DecryptCommand', 'Command not available'));
2295
+ } else {
2296
+ tmp = tmp0_elvis_lhs;
2297
+ }
2298
+ var command = tmp;
2299
+ var tmp1_elvis_lhs = this.i5k_1;
2300
+ var tmp_0;
2301
+ if (tmp1_elvis_lhs == null) {
2302
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2303
+ } else {
2304
+ tmp_0 = tmp1_elvis_lhs;
2305
+ }
2306
+ var exec = tmp_0;
2307
+ var args = new DecryptArgs(keyInfo, ciphertext, algorithm, iv, authTag, additionalAuthenticatedData);
2308
+ return command.n2j(args, $completion);
2309
+ };
2310
+ protoOf(KeyManagerServiceImpl).u5v = function (wrappingKeyInfo, keyToWrap, algorithm, $completion) {
2311
+ var tmp0_elvis_lhs = this.q5k_1;
2312
+ var tmp;
2313
+ if (tmp0_elvis_lhs == null) {
2314
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'WrapKeyCommand', 'Command not available'));
2315
+ } else {
2316
+ tmp = tmp0_elvis_lhs;
2317
+ }
2318
+ var command = tmp;
2319
+ var tmp1_elvis_lhs = this.i5k_1;
2320
+ var tmp_0;
2321
+ if (tmp1_elvis_lhs == null) {
2322
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2323
+ } else {
2324
+ tmp_0 = tmp1_elvis_lhs;
2325
+ }
2326
+ var exec = tmp_0;
2327
+ var args = new WrapKeyArgs(wrappingKeyInfo, keyToWrap, algorithm);
2328
+ return command.n2j(args, $completion);
2329
+ };
2330
+ protoOf(KeyManagerServiceImpl).v5v = function (unwrappingKeyInfo, wrappedKey, algorithm, $completion) {
2331
+ var tmp0_elvis_lhs = this.r5k_1;
2332
+ var tmp;
2333
+ if (tmp0_elvis_lhs == null) {
2334
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'UnwrapKeyCommand', 'Command not available'));
2335
+ } else {
2336
+ tmp = tmp0_elvis_lhs;
2337
+ }
2338
+ var command = tmp;
2339
+ var tmp1_elvis_lhs = this.i5k_1;
2340
+ var tmp_0;
2341
+ if (tmp1_elvis_lhs == null) {
2342
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2343
+ } else {
2344
+ tmp_0 = tmp1_elvis_lhs;
2345
+ }
2346
+ var exec = tmp_0;
2347
+ var args = new UnwrapKeyArgs(unwrappingKeyInfo, wrappedKey, algorithm);
2348
+ return command.n2j(args, $completion);
2349
+ };
2350
+ protoOf(KeyManagerServiceImpl).m4e = function (privateKeyInfo, publicKeyInfo, algorithm, keyDataLen, $completion) {
2351
+ var tmp0_elvis_lhs = this.s5k_1;
2352
+ var tmp;
2353
+ if (tmp0_elvis_lhs == null) {
2354
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'PerformKeyAgreementCommand', 'Command not available'));
2355
+ } else {
2356
+ tmp = tmp0_elvis_lhs;
2357
+ }
2358
+ var command = tmp;
2359
+ var tmp1_elvis_lhs = this.i5k_1;
2360
+ var tmp_0;
2361
+ if (tmp1_elvis_lhs == null) {
2362
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2363
+ } else {
2364
+ tmp_0 = tmp1_elvis_lhs;
2365
+ }
2366
+ var exec = tmp_0;
2367
+ var args = new PerformKeyAgreementArgs(privateKeyInfo, publicKeyInfo, algorithm, keyDataLen);
2368
+ return command.n2j(args, $completion);
2369
+ };
2370
+ protoOf(KeyManagerServiceImpl).o4e = function (providerId, alias, use, keyOperations, alg, keyVisibility, $completion) {
2371
+ var tmp0_elvis_lhs = this.t5k_1;
2372
+ var tmp;
2373
+ if (tmp0_elvis_lhs == null) {
2374
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'GenerateKeyCommand', 'Command not available'));
2375
+ } else {
2376
+ tmp = tmp0_elvis_lhs;
2377
+ }
2378
+ var command = tmp;
2379
+ var tmp1_elvis_lhs = this.i5k_1;
2380
+ var tmp_0;
2381
+ if (tmp1_elvis_lhs == null) {
2382
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2383
+ } else {
2384
+ tmp_0 = tmp1_elvis_lhs;
2385
+ }
2386
+ var exec = tmp_0;
2387
+ var args = new GenerateKeyArgs(providerId, alias, use, keyOperations, alg, keyVisibility);
2388
+ return command.n2j(args, $completion);
2389
+ };
2390
+ protoOf(KeyManagerServiceImpl).q4e = function (providerId, $completion) {
2391
+ var tmp0_elvis_lhs = this.u5k_1;
2392
+ var tmp;
2393
+ if (tmp0_elvis_lhs == null) {
2394
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'ListKeysCommand', 'Command not available'));
2395
+ } else {
2396
+ tmp = tmp0_elvis_lhs;
2397
+ }
2398
+ var command = tmp;
2399
+ var tmp1_elvis_lhs = this.i5k_1;
2400
+ var tmp_0;
2401
+ if (tmp1_elvis_lhs == null) {
2402
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2403
+ } else {
2404
+ tmp_0 = tmp1_elvis_lhs;
2405
+ }
2406
+ var exec = tmp_0;
2407
+ var args = new ListKeysArgs(providerId);
2408
+ return command.n2j(args, $completion);
2409
+ };
2410
+ protoOf(KeyManagerServiceImpl).w5v = function (keyInfo, $completion) {
2411
+ var tmp0_elvis_lhs = this.v5k_1;
2412
+ var tmp;
2413
+ if (tmp0_elvis_lhs == null) {
2414
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'GetKeyCommand', 'Command not available'));
2415
+ } else {
2416
+ tmp = tmp0_elvis_lhs;
2417
+ }
2418
+ var command = tmp;
2419
+ var tmp1_elvis_lhs = this.i5k_1;
2420
+ var tmp_0;
2421
+ if (tmp1_elvis_lhs == null) {
2422
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2423
+ } else {
2424
+ tmp_0 = tmp1_elvis_lhs;
2425
+ }
2426
+ var exec = tmp_0;
2427
+ var args = new GetKeyArgs(keyInfo);
2428
+ return command.n2j(args, $completion);
2429
+ };
2430
+ protoOf(KeyManagerServiceImpl).s4e = function (keyInfo, providerId, alias, certChain, $completion) {
2431
+ var tmp0_elvis_lhs = this.w5k_1;
2432
+ var tmp;
2433
+ if (tmp0_elvis_lhs == null) {
2434
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'StoreKeyCommand', 'Command not available'));
2435
+ } else {
2436
+ tmp = tmp0_elvis_lhs;
2437
+ }
2438
+ var command = tmp;
2439
+ var tmp1_elvis_lhs = this.i5k_1;
2440
+ var tmp_0;
2441
+ if (tmp1_elvis_lhs == null) {
2442
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2443
+ } else {
2444
+ tmp_0 = tmp1_elvis_lhs;
2445
+ }
2446
+ var exec = tmp_0;
2447
+ var args = new StoreKeyArgs(keyInfo, providerId, alias, certChain);
2448
+ return command.n2j(args, $completion);
2449
+ };
2450
+ protoOf(KeyManagerServiceImpl).x5v = function (keyInfo, $completion) {
2451
+ var tmp0_elvis_lhs = this.x5k_1;
2452
+ var tmp;
2453
+ if (tmp0_elvis_lhs == null) {
2454
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'DeleteKeyCommand', 'Command not available'));
2455
+ } else {
2456
+ tmp = tmp0_elvis_lhs;
2457
+ }
2458
+ var command = tmp;
2459
+ var tmp1_elvis_lhs = this.i5k_1;
2460
+ var tmp_0;
2461
+ if (tmp1_elvis_lhs == null) {
2462
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2463
+ } else {
2464
+ tmp_0 = tmp1_elvis_lhs;
2465
+ }
2466
+ var exec = tmp_0;
2467
+ var args = new DeleteKeyArgs(keyInfo);
2468
+ return command.n2j(args, $completion);
2469
+ };
2470
+ protoOf(KeyManagerServiceImpl).u4e = function (keyInfo, identifierMethod, trustedCerts, verifyX509CertificateChain, $completion) {
2471
+ var tmp0_elvis_lhs = this.y5k_1;
2472
+ var tmp;
2473
+ if (tmp0_elvis_lhs == null) {
2474
+ return asErrorResult(Companion_instance_1.h2g(VOID, VOID, 'ResolvePublicKeyCommand', 'Command not available'));
2475
+ } else {
2476
+ tmp = tmp0_elvis_lhs;
2477
+ }
2478
+ var command = tmp;
2479
+ var tmp1_elvis_lhs = this.i5k_1;
2480
+ var tmp_0;
2481
+ if (tmp1_elvis_lhs == null) {
2482
+ return asErrorResult(Companion_instance_1.b2g(VOID, VOID, 'SessionExecution not available'));
2483
+ } else {
2484
+ tmp_0 = tmp1_elvis_lhs;
2485
+ }
2486
+ var exec = tmp_0;
2487
+ var args = new ResolvePublicKeyArgs(keyInfo, identifierMethod, trustedCerts, verifyX509CertificateChain);
2488
+ return command.n2j(args, $completion);
2489
+ };
2490
+ function Companion_0() {
2491
+ }
2492
+ protoOf(Companion_0).create = function (keyResolvers) {
2493
+ return new MetroFactory_0(keyResolvers);
2494
+ };
2495
+ protoOf(Companion_0).newInstance = function (keyResolvers) {
2496
+ return new KeyResolverRegistryImpl(keyResolvers);
2497
+ };
2498
+ var Companion_instance_3;
2499
+ function Companion_getInstance_3() {
2500
+ return Companion_instance_3;
2501
+ }
2502
+ function BindsMirror_0() {
2503
+ }
2504
+ protoOf(MetroFactory_0).z1b = function () {
2505
+ return Companion_instance_3.newInstance(this.y5v_1.z1b());
2506
+ };
2507
+ function MetroFactory_0(keyResolvers) {
2508
+ this.y5v_1 = keyResolvers;
2509
+ }
2510
+ protoOf(MetroFactory_0).mirrorFunction = function (keyResolvers) {
2511
+ // Inline function 'kotlin.error' call
2512
+ var message = 'Never called';
2513
+ throw IllegalStateException_init_$Create$(toString(message));
2514
+ };
2515
+ function MetroContributionToSessionScope_0() {
2516
+ }
2517
+ function sam$kotlin_Comparator$0(function_0) {
2518
+ this.z5v_1 = function_0;
2519
+ }
2520
+ protoOf(sam$kotlin_Comparator$0).sd = function (a, b) {
2521
+ return this.z5v_1(a, b);
2522
+ };
2523
+ protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
2524
+ return this.sd(a, b);
2525
+ };
2526
+ protoOf(sam$kotlin_Comparator$0).s3 = function () {
2527
+ return this.z5v_1;
2528
+ };
2529
+ protoOf(sam$kotlin_Comparator$0).equals = function (other) {
2530
+ var tmp;
2531
+ if (!(other == null) ? isInterface(other, Comparator) : false) {
2532
+ var tmp_0;
2533
+ if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
2534
+ tmp_0 = equals(this.s3(), other.s3());
2535
+ } else {
2536
+ tmp_0 = false;
2537
+ }
2538
+ tmp = tmp_0;
2539
+ } else {
2540
+ tmp = false;
2541
+ }
2542
+ return tmp;
2543
+ };
2544
+ protoOf(sam$kotlin_Comparator$0).hashCode = function () {
2545
+ return hashCode(this.s3());
2546
+ };
2547
+ function KeyResolverRegistryImpl$keyResolversById$lambda(a, b) {
2548
+ // Inline function 'kotlin.comparisons.compareValuesBy' call
2549
+ var tmp = a.getId();
2550
+ var tmp$ret$2 = b.getId();
2551
+ return compareValues(tmp, tmp$ret$2);
2552
+ }
2553
+ function KeyResolverRegistryImpl(keyResolvers) {
2554
+ var tmp = this;
2555
+ // Inline function 'kotlin.collections.sortedBy' call
2556
+ // Inline function 'kotlin.comparisons.compareBy' call
2557
+ var tmp_0 = KeyResolverRegistryImpl$keyResolversById$lambda;
2558
+ var tmp$ret$1 = new sam$kotlin_Comparator$0(tmp_0);
2559
+ // Inline function 'kotlin.collections.associateBy' call
2560
+ var this_0 = sortedWith(keyResolvers, tmp$ret$1);
2561
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
2562
+ // Inline function 'kotlin.collections.associateByTo' call
2563
+ var destination = LinkedHashMap_init_$Create$(capacity);
2564
+ var _iterator__ex2g4s = this_0.t();
2565
+ while (_iterator__ex2g4s.u()) {
2566
+ var element = _iterator__ex2g4s.v();
2567
+ var tmp$ret$4 = element.getId();
2568
+ destination.j3(tmp$ret$4, element);
2569
+ }
2570
+ tmp.a5w_1 = toMutableMap(destination);
2571
+ this.b5w_1 = null;
2572
+ }
2573
+ protoOf(KeyResolverRegistryImpl).defaultResolverId = function () {
2574
+ // Inline function 'kotlin.collections.isNotEmpty' call
2575
+ // Inline function 'kotlin.require' call
2576
+ if (!!this.a5w_1.r()) {
2577
+ var message = 'At least one key resolver is required';
2578
+ throw IllegalArgumentException_init_$Create$(toString(message));
2579
+ }
2580
+ var tmp0_elvis_lhs = this.b5w_1;
2581
+ return tmp0_elvis_lhs == null ? first(this.a5w_1.z2()).getId() : tmp0_elvis_lhs;
2582
+ };
2583
+ protoOf(KeyResolverRegistryImpl).getResolverIds = function () {
2584
+ // Inline function 'kotlin.collections.toTypedArray' call
2585
+ var this_0 = this.a5w_1.y2();
2586
+ return copyToArray(this_0);
2587
+ };
2588
+ protoOf(KeyResolverRegistryImpl).y4e = function (id) {
2589
+ var tmp0_elvis_lhs = this.a5w_1.x2(id);
2590
+ var tmp;
2591
+ if (tmp0_elvis_lhs == null) {
2592
+ throw new PKIException('Invalid Resolver id ' + id + '. Valid ids are: ' + joinToString(this.getResolverIds(), ','));
2593
+ } else {
2594
+ tmp = tmp0_elvis_lhs;
2595
+ }
2596
+ return tmp;
2597
+ };
2598
+ protoOf(KeyResolverRegistryImpl).z4e = function (identifierMethod, keyType, resolverId) {
2599
+ // Inline function 'kotlin.collections.isNotEmpty' call
2600
+ // Inline function 'kotlin.require' call
2601
+ if (!!this.a5w_1.r()) {
2602
+ var message = 'At least one resolver is required';
2603
+ throw IllegalArgumentException_init_$Create$(toString(message));
2604
+ }
2605
+ var tmp0 = this.a5w_1.z2();
2606
+ var tmp$ret$3;
2607
+ $l$block_4: {
2608
+ // Inline function 'kotlin.collections.firstOrNull' call
2609
+ var _iterator__ex2g4s = tmp0.t();
2610
+ while (_iterator__ex2g4s.u()) {
2611
+ var element = _iterator__ex2g4s.v();
2612
+ var tmp$ret$4;
2613
+ $l$block_3: {
2614
+ if (!(resolverId == null) && element.getId() === resolverId) {
2615
+ tmp$ret$4 = true;
2616
+ break $l$block_3;
2617
+ }
2618
+ if (!(keyType == null)) {
2619
+ if (!(identifierMethod == null)) {
2620
+ tmp$ret$4 = contains(element.getSupportedKeyTypes(identifierMethod), keyType);
2621
+ break $l$block_3;
2622
+ } else if (contains(element.allSupportedKeyTypes(), keyType)) {
2623
+ tmp$ret$4 = true;
2624
+ break $l$block_3;
2625
+ }
2626
+ }
2627
+ if (!(identifierMethod == null) && contains(element.allSupportedIdentifierMethods(), identifierMethod)) {
2628
+ tmp$ret$4 = true;
2629
+ break $l$block_3;
2630
+ }
2631
+ if (identifierMethod == null && keyType == null && resolverId == null) {
2632
+ tmp$ret$4 = element.getId() === this.defaultResolverId();
2633
+ break $l$block_3;
2634
+ }
2635
+ tmp$ret$4 = false;
2636
+ }
2637
+ if (tmp$ret$4) {
2638
+ tmp$ret$3 = element;
2639
+ break $l$block_4;
2640
+ }
2641
+ }
2642
+ tmp$ret$3 = null;
2643
+ }
2644
+ var resolver = tmp$ret$3;
2645
+ var tmp;
2646
+ if (resolver == null) {
2647
+ throw IllegalArgumentException_init_$Create$('Could not find resolver for identifier method ' + toString_0(identifierMethod) + ' and key type ' + toString_0(keyType));
2648
+ } else {
2649
+ tmp = resolver;
2650
+ }
2651
+ return tmp;
2652
+ };
2653
+ protoOf(KeyResolverRegistryImpl).a4f = function (resolver, makeDefaultResolver) {
2654
+ var tmp0 = this.a5w_1;
2655
+ // Inline function 'kotlin.collections.set' call
2656
+ var key = resolver.getId();
2657
+ tmp0.j3(key, resolver);
2658
+ if (makeDefaultResolver === true) {
2659
+ this.b5w_1 = resolver.getId();
2660
+ }
2661
+ };
2662
+ function Companion_1() {
2663
+ }
2664
+ protoOf(Companion_1).create = function (contextConfig, kmsProviderManager, execution) {
2665
+ return new MetroFactory_1(contextConfig, kmsProviderManager, execution);
2666
+ };
2667
+ protoOf(Companion_1).newInstance = function (contextConfig, kmsProviderManager, execution) {
2668
+ return new KmsProviderRegistryImpl(contextConfig, kmsProviderManager, execution);
2669
+ };
2670
+ var Companion_instance_4;
2671
+ function Companion_getInstance_4() {
2672
+ return Companion_instance_4;
2673
+ }
2674
+ function BindsMirror_1() {
2675
+ }
2676
+ function _get_kmsProvidersById__3ih65k($this) {
2677
+ var tmp0 = $this.f5w_1;
2678
+ var tmp = KProperty1;
2679
+ // Inline function 'kotlin.getValue' call
2680
+ getPropertyCallableRef('kmsProvidersById', 1, tmp, KmsProviderRegistryImpl$_get_kmsProvidersById_$ref_i56lok(), null);
2681
+ return tmp0.t2();
2682
+ }
2683
+ protoOf(MetroFactory_1).z1b = function () {
2684
+ return Companion_instance_4.newInstance(this.h5w_1.z1b(), this.i5w_1.z1b(), this.j5w_1.z1b());
2685
+ };
2686
+ function MetroFactory_1(contextConfig, kmsProviderManager, execution) {
2687
+ this.h5w_1 = contextConfig;
2688
+ this.i5w_1 = kmsProviderManager;
2689
+ this.j5w_1 = execution;
2690
+ }
2691
+ protoOf(MetroFactory_1).mirrorFunction = function (contextConfig, kmsProviderManager, execution) {
2692
+ // Inline function 'kotlin.error' call
2693
+ var message = 'Never called';
2694
+ throw IllegalStateException_init_$Create$(toString(message));
2695
+ };
2696
+ function MetroContributionToSessionScope_1() {
2697
+ }
2698
+ function sam$kotlin_Comparator$0_0(function_0) {
2699
+ this.k5w_1 = function_0;
2700
+ }
2701
+ protoOf(sam$kotlin_Comparator$0_0).sd = function (a, b) {
2702
+ return this.k5w_1(a, b);
2703
+ };
2704
+ protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
2705
+ return this.sd(a, b);
2706
+ };
2707
+ protoOf(sam$kotlin_Comparator$0_0).s3 = function () {
2708
+ return this.k5w_1;
2709
+ };
2710
+ protoOf(sam$kotlin_Comparator$0_0).equals = function (other) {
2711
+ var tmp;
2712
+ if (!(other == null) ? isInterface(other, Comparator) : false) {
2713
+ var tmp_0;
2714
+ if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
2715
+ tmp_0 = equals(this.s3(), other.s3());
2716
+ } else {
2717
+ tmp_0 = false;
2718
+ }
2719
+ tmp = tmp_0;
2720
+ } else {
2721
+ tmp = false;
2722
+ }
2723
+ return tmp;
2724
+ };
2725
+ protoOf(sam$kotlin_Comparator$0_0).hashCode = function () {
2726
+ return hashCode(this.s3());
2727
+ };
2728
+ function KmsProviderRegistryImpl$kmsProvidersById$delegate$lambda$lambda(a, b) {
2729
+ // Inline function 'kotlin.comparisons.compareValuesBy' call
2730
+ var tmp = a.id;
2731
+ var tmp$ret$2 = b.id;
2732
+ return compareValues(tmp, tmp$ret$2);
2733
+ }
2734
+ function KmsProviderRegistryImpl$kmsProvidersById$delegate$lambda(this$0) {
2735
+ return function () {
2736
+ // Inline function 'kotlin.collections.sortedBy' call
2737
+ var this_0 = this$0.d5w_1.n5w(this$0.c5w_1, this$0.e5w_1);
2738
+ // Inline function 'kotlin.comparisons.compareBy' call
2739
+ var tmp = KmsProviderRegistryImpl$kmsProvidersById$delegate$lambda$lambda;
2740
+ var tmp$ret$1 = new sam$kotlin_Comparator$0_0(tmp);
2741
+ // Inline function 'kotlin.collections.associateBy' call
2742
+ var this_1 = sortedWith(this_0, tmp$ret$1);
2743
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
2744
+ // Inline function 'kotlin.collections.associateByTo' call
2745
+ var destination = LinkedHashMap_init_$Create$(capacity);
2746
+ var _iterator__ex2g4s = this_1.t();
2747
+ while (_iterator__ex2g4s.u()) {
2748
+ var element = _iterator__ex2g4s.v();
2749
+ var tmp$ret$4 = element.id;
2750
+ destination.j3(tmp$ret$4, element);
2751
+ }
2752
+ return toMutableMap(destination);
2753
+ };
2754
+ }
2755
+ function KmsProviderRegistryImpl$_get_kmsProvidersById_$ref_i56lok() {
2756
+ return function (p0) {
2757
+ return _get_kmsProvidersById__3ih65k(p0);
2758
+ };
2759
+ }
2760
+ function KmsProviderRegistryImpl(contextConfig, kmsProviderManager, execution) {
2761
+ this.c5w_1 = contextConfig;
2762
+ this.d5w_1 = kmsProviderManager;
2763
+ this.e5w_1 = execution;
2764
+ var tmp = this;
2765
+ tmp.f5w_1 = lazy(KmsProviderRegistryImpl$kmsProvidersById$delegate$lambda(this));
2766
+ this.g5w_1 = null;
2767
+ }
2768
+ protoOf(KmsProviderRegistryImpl).defaultProviderId = function () {
2769
+ // Inline function 'kotlin.collections.isNotEmpty' call
2770
+ // Inline function 'kotlin.require' call
2771
+ if (!!_get_kmsProvidersById__3ih65k(this).r()) {
2772
+ var message = 'At least one KMS provider is required';
2773
+ throw IllegalArgumentException_init_$Create$(toString(message));
2774
+ }
2775
+ var tmp0_elvis_lhs = this.g5w_1;
2776
+ return tmp0_elvis_lhs == null ? first(_get_kmsProvidersById__3ih65k(this).z2()).id : tmp0_elvis_lhs;
2777
+ };
2778
+ protoOf(KmsProviderRegistryImpl).getProviderIds = function () {
2779
+ // Inline function 'kotlin.collections.toTypedArray' call
2780
+ var this_0 = _get_kmsProvidersById__3ih65k(this).y2();
2781
+ return copyToArray(this_0);
2782
+ };
2783
+ protoOf(KmsProviderRegistryImpl).u4l = function (id) {
2784
+ var tmp0_elvis_lhs = _get_kmsProvidersById__3ih65k(this).x2(id);
2785
+ var tmp;
2786
+ if (tmp0_elvis_lhs == null) {
2787
+ throw new PKIException('Invalid KMS id ' + id + ' provider. Valid ids are: ' + joinToString(this.getProviderIds(), ','));
2788
+ } else {
2789
+ tmp = tmp0_elvis_lhs;
2790
+ }
2791
+ return tmp;
2792
+ };
2793
+ protoOf(KmsProviderRegistryImpl).v4l = function (providerId, alg) {
2794
+ if (providerId == null && !(alg == null)) {
2795
+ return this.getKmsBySignatureAlgorithm(alg);
2796
+ }
2797
+ return this.getProviderById(providerId == null ? this.defaultProviderId() : providerId);
2798
+ };
2799
+ protoOf(KmsProviderRegistryImpl).getKmsBySignatureAlgorithm = function (signatureAlgorithm) {
2800
+ var tmp0 = _get_kmsProvidersById__3ih65k(this).z2();
2801
+ var tmp$ret$0;
2802
+ $l$block: {
2803
+ // Inline function 'kotlin.collections.firstOrNull' call
2804
+ var _iterator__ex2g4s = tmp0.t();
2805
+ while (_iterator__ex2g4s.u()) {
2806
+ var element = _iterator__ex2g4s.v();
2807
+ if (contains(element.supportedSignatureAlgorithms(), signatureAlgorithm)) {
2808
+ tmp$ret$0 = element;
2809
+ break $l$block;
2810
+ }
2811
+ }
2812
+ tmp$ret$0 = null;
2813
+ }
2814
+ var tmp0_elvis_lhs = tmp$ret$0;
2815
+ var tmp;
2816
+ if (tmp0_elvis_lhs == null) {
2817
+ throw new PKIException('No KMS found for signature algorithm ' + toString(signatureAlgorithm));
2818
+ } else {
2819
+ tmp = tmp0_elvis_lhs;
2820
+ }
2821
+ return tmp;
2822
+ };
2823
+ protoOf(KmsProviderRegistryImpl).w4l = function (provider, makeDefaultKms) {
2824
+ var tmp0 = _get_kmsProvidersById__3ih65k(this);
2825
+ // Inline function 'kotlin.collections.set' call
2826
+ var key = provider.id;
2827
+ tmp0.j3(key, provider);
2828
+ if (makeDefaultKms === true) {
2829
+ this.g5w_1 = provider.id;
2830
+ }
2831
+ };
2832
+ function Companion_2() {
2833
+ }
2834
+ protoOf(Companion_2).create = function (delegateFactory) {
2835
+ return Companion_getInstance_1().x1b(new Impl(delegateFactory));
2836
+ };
2837
+ var Companion_instance_5;
2838
+ function Companion_getInstance_5() {
2839
+ return Companion_instance_5;
2840
+ }
2841
+ protoOf(Impl).create = function (config, backingStorage, partitionKey) {
2842
+ return this.o5w_1.p5w(config, backingStorage, partitionKey);
2843
+ };
2844
+ function Impl(delegateFactory) {
2845
+ this.o5w_1 = delegateFactory;
2846
+ }
2847
+ function MemoryKeyStoreServiceFactory() {
2848
+ }
2849
+ function Companion_3() {
2850
+ }
2851
+ protoOf(Companion_3).q5w = function (config, backingStorage, partitionKey) {
2852
+ return new MemoryKeyStoreService(config, backingStorage, partitionKey);
2853
+ };
2854
+ var Companion_instance_6;
2855
+ function Companion_getInstance_6() {
2856
+ return Companion_instance_6;
2857
+ }
2858
+ function _get_partition__kyj23d($this) {
2859
+ var tmp0_safe_receiver = $this.s5w_1;
2860
+ var tmp;
2861
+ if (tmp0_safe_receiver == null) {
2862
+ tmp = null;
2863
+ } else {
2864
+ // Inline function 'kotlin.let' call
2865
+ var tmp0_safe_receiver_0 = $this.t5w_1;
2866
+ var tmp_0;
2867
+ if (tmp0_safe_receiver_0 == null) {
2868
+ tmp_0 = null;
2869
+ } else {
2870
+ // Inline function 'kotlin.let' call
2871
+ tmp_0 = tmp0_safe_receiver.b5x(tmp0_safe_receiver_0);
2872
+ }
2873
+ tmp = tmp_0;
2874
+ }
2875
+ return tmp;
2876
+ }
2877
+ function _get_keys__d97k5z($this) {
2878
+ var tmp0_safe_receiver = _get_partition__kyj23d($this);
2879
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c5x_1;
2880
+ return tmp1_elvis_lhs == null ? $this.y5w_1 : tmp1_elvis_lhs;
2881
+ }
2882
+ function _get_certificateChains__l5yeco($this) {
2883
+ var tmp0_safe_receiver = _get_partition__kyj23d($this);
2884
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d5x_1;
2885
+ return tmp1_elvis_lhs == null ? $this.z5w_1 : tmp1_elvis_lhs;
2886
+ }
2887
+ function _get_certificates__eymdpt($this) {
2888
+ var tmp0_safe_receiver = _get_partition__kyj23d($this);
2889
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e5x_1;
2890
+ return tmp1_elvis_lhs == null ? $this.a5x_1 : tmp1_elvis_lhs;
2891
+ }
2892
+ function $listKeys$suspendBridgeCOROUTINE$_1(_this__u8e3s4, resultContinuation) {
2893
+ CoroutineImpl.call(this, resultContinuation);
2894
+ this.n5x_1 = _this__u8e3s4;
2895
+ }
2896
+ protoOf($listKeys$suspendBridgeCOROUTINE$_1).d9 = function () {
2897
+ var suspendResult = this.x8_1;
2898
+ $sm: do
2899
+ try {
2900
+ var tmp = this.v8_1;
2901
+ switch (tmp) {
2902
+ case 0:
2903
+ this.w8_1 = 4;
2904
+ if (this.n5x_1.listKeys === protoOf(MemoryKeyStoreService).listKeys) {
2905
+ this.v8_1 = 2;
2906
+ suspendResult = this.n5x_1.c4i(this);
2907
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2908
+ return suspendResult;
2909
+ }
2910
+ continue $sm;
2911
+ } else {
2912
+ this.v8_1 = 1;
2913
+ suspendResult = await_0(this.n5x_1.listKeys(), this);
2914
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2915
+ return suspendResult;
2916
+ }
2917
+ continue $sm;
2918
+ }
2919
+
2920
+ case 1:
2921
+ this.o5x_1 = suspendResult;
2922
+ this.v8_1 = 3;
2923
+ continue $sm;
2924
+ case 2:
2925
+ this.o5x_1 = suspendResult;
2926
+ this.v8_1 = 3;
2927
+ continue $sm;
2928
+ case 3:
2929
+ return this.o5x_1;
2930
+ case 4:
2931
+ throw this.y8_1;
2932
+ }
2933
+ } catch ($p) {
2934
+ var e = $p;
2935
+ if (this.w8_1 === 4) {
2936
+ throw e;
2937
+ } else {
2938
+ this.v8_1 = this.w8_1;
2939
+ this.y8_1 = e;
2940
+ }
2941
+ }
2942
+ while (true);
2943
+ };
2944
+ function $getKey$suspendBridgeCOROUTINE$_0(_this__u8e3s4, keyInfo, resultContinuation) {
2945
+ CoroutineImpl.call(this, resultContinuation);
2946
+ this.x5x_1 = _this__u8e3s4;
2947
+ this.y5x_1 = keyInfo;
2948
+ }
2949
+ protoOf($getKey$suspendBridgeCOROUTINE$_0).d9 = function () {
2950
+ var suspendResult = this.x8_1;
2951
+ $sm: do
2952
+ try {
2953
+ var tmp = this.v8_1;
2954
+ switch (tmp) {
2955
+ case 0:
2956
+ this.w8_1 = 4;
2957
+ if (this.x5x_1.getKey === protoOf(MemoryKeyStoreService).getKey) {
2958
+ this.v8_1 = 2;
2959
+ suspendResult = this.x5x_1.e4i(this.y5x_1, this);
2960
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2961
+ return suspendResult;
2962
+ }
2963
+ continue $sm;
2964
+ } else {
2965
+ this.v8_1 = 1;
2966
+ suspendResult = await_0(this.x5x_1.getKey(this.y5x_1), this);
2967
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
2968
+ return suspendResult;
2969
+ }
2970
+ continue $sm;
2971
+ }
2972
+
2973
+ case 1:
2974
+ this.z5x_1 = suspendResult;
2975
+ this.v8_1 = 3;
2976
+ continue $sm;
2977
+ case 2:
2978
+ this.z5x_1 = suspendResult;
2979
+ this.v8_1 = 3;
2980
+ continue $sm;
2981
+ case 3:
2982
+ return this.z5x_1;
2983
+ case 4:
2984
+ throw this.y8_1;
2985
+ }
2986
+ } catch ($p) {
2987
+ var e = $p;
2988
+ if (this.w8_1 === 4) {
2989
+ throw e;
2990
+ } else {
2991
+ this.v8_1 = this.w8_1;
2992
+ this.y8_1 = e;
2993
+ }
2994
+ }
2995
+ while (true);
2996
+ };
2997
+ function $deleteKeyCOROUTINE$_0(_this__u8e3s4, keyInfo, resultContinuation) {
2998
+ CoroutineImpl.call(this, resultContinuation);
2999
+ this.i5y_1 = _this__u8e3s4;
3000
+ this.j5y_1 = keyInfo;
3001
+ }
3002
+ protoOf($deleteKeyCOROUTINE$_0).d9 = function () {
3003
+ var suspendResult = this.x8_1;
3004
+ $sm: do
3005
+ try {
3006
+ var tmp = this.v8_1;
3007
+ switch (tmp) {
3008
+ case 0:
3009
+ this.w8_1 = 3;
3010
+ this.w8_1 = 2;
3011
+ this.v8_1 = 1;
3012
+ suspendResult = this.i5y_1.y4h(this.j5y_1, this);
3013
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3014
+ return suspendResult;
3015
+ }
3016
+
3017
+ continue $sm;
3018
+ case 1:
3019
+ var storedKeyInfo = suspendResult;
3020
+ this.k5y_1 = !(_get_keys__d97k5z(this.i5y_1).k3(storedKeyInfo.m3n()) == null);
3021
+ this.w8_1 = 3;
3022
+ this.v8_1 = 4;
3023
+ continue $sm;
3024
+ case 2:
3025
+ this.w8_1 = 3;
3026
+ var tmp_0 = this.y8_1;
3027
+ if (tmp_0 instanceof NotFoundException) {
3028
+ var e = this.y8_1;
3029
+ var tmp_1 = this;
3030
+ tmp_1.k5y_1 = false;
3031
+ this.v8_1 = 4;
3032
+ continue $sm;
3033
+ } else {
3034
+ var tmp_2 = this.y8_1;
3035
+ if (tmp_2 instanceof IllegalArgumentException) {
3036
+ var e_0 = this.y8_1;
3037
+ var tmp_3 = this;
3038
+ tmp_3.k5y_1 = false;
3039
+ this.v8_1 = 4;
3040
+ continue $sm;
3041
+ } else {
3042
+ throw this.y8_1;
3043
+ }
3044
+ }
3045
+
3046
+ case 3:
3047
+ throw this.y8_1;
3048
+ case 4:
3049
+ this.w8_1 = 3;
3050
+ return this.k5y_1;
3051
+ }
3052
+ } catch ($p) {
3053
+ var e_1 = $p;
3054
+ if (this.w8_1 === 3) {
3055
+ throw e_1;
3056
+ } else {
3057
+ this.v8_1 = this.w8_1;
3058
+ this.y8_1 = e_1;
3059
+ }
3060
+ }
3061
+ while (true);
3062
+ };
3063
+ function $deleteKey$suspendBridgeCOROUTINE$_0(_this__u8e3s4, keyInfo, resultContinuation) {
3064
+ CoroutineImpl.call(this, resultContinuation);
3065
+ this.t5y_1 = _this__u8e3s4;
3066
+ this.u5y_1 = keyInfo;
3067
+ }
3068
+ protoOf($deleteKey$suspendBridgeCOROUTINE$_0).d9 = function () {
3069
+ var suspendResult = this.x8_1;
3070
+ $sm: do
3071
+ try {
3072
+ var tmp = this.v8_1;
3073
+ switch (tmp) {
3074
+ case 0:
3075
+ this.w8_1 = 4;
3076
+ if (this.t5y_1.deleteKey === protoOf(MemoryKeyStoreService).deleteKey) {
3077
+ this.v8_1 = 2;
3078
+ suspendResult = this.t5y_1.g4i(this.u5y_1, this);
3079
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3080
+ return suspendResult;
3081
+ }
3082
+ continue $sm;
3083
+ } else {
3084
+ this.v8_1 = 1;
3085
+ suspendResult = await_0(this.t5y_1.deleteKey(this.u5y_1), this);
3086
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3087
+ return suspendResult;
3088
+ }
3089
+ continue $sm;
3090
+ }
3091
+
3092
+ case 1:
3093
+ this.v5y_1 = suspendResult;
3094
+ this.v8_1 = 3;
3095
+ continue $sm;
3096
+ case 2:
3097
+ this.v5y_1 = suspendResult;
3098
+ this.v8_1 = 3;
3099
+ continue $sm;
3100
+ case 3:
3101
+ return this.v5y_1;
3102
+ case 4:
3103
+ throw this.y8_1;
3104
+ }
3105
+ } catch ($p) {
3106
+ var e = $p;
3107
+ if (this.w8_1 === 4) {
3108
+ throw e;
3109
+ } else {
3110
+ this.v8_1 = this.w8_1;
3111
+ this.y8_1 = e;
3112
+ }
3113
+ }
3114
+ while (true);
3115
+ };
3116
+ function $storeKey$suspendBridgeCOROUTINE$_0(_this__u8e3s4, keyInfo, providerId, alias, certChain, resultContinuation) {
3117
+ CoroutineImpl.call(this, resultContinuation);
3118
+ this.e5z_1 = _this__u8e3s4;
3119
+ this.f5z_1 = keyInfo;
3120
+ this.g5z_1 = providerId;
3121
+ this.h5z_1 = alias;
3122
+ this.i5z_1 = certChain;
3123
+ }
3124
+ protoOf($storeKey$suspendBridgeCOROUTINE$_0).d9 = function () {
3125
+ var suspendResult = this.x8_1;
3126
+ $sm: do
3127
+ try {
3128
+ var tmp = this.v8_1;
3129
+ switch (tmp) {
3130
+ case 0:
3131
+ this.w8_1 = 4;
3132
+ if (this.e5z_1.storeKey === protoOf(MemoryKeyStoreService).storeKey) {
3133
+ this.v8_1 = 2;
3134
+ suspendResult = this.e5z_1.x4e(this.f5z_1, this.g5z_1, this.h5z_1, this.i5z_1, this);
3135
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3136
+ return suspendResult;
3137
+ }
3138
+ continue $sm;
3139
+ } else {
3140
+ this.v8_1 = 1;
3141
+ suspendResult = await_0(this.e5z_1.storeKey(this.f5z_1, this.g5z_1, this.h5z_1, this.i5z_1), this);
3142
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3143
+ return suspendResult;
3144
+ }
3145
+ continue $sm;
3146
+ }
3147
+
3148
+ case 1:
3149
+ this.j5z_1 = suspendResult;
3150
+ this.v8_1 = 3;
3151
+ continue $sm;
3152
+ case 2:
3153
+ this.j5z_1 = suspendResult;
3154
+ this.v8_1 = 3;
3155
+ continue $sm;
3156
+ case 3:
3157
+ return this.j5z_1;
3158
+ case 4:
3159
+ throw this.y8_1;
3160
+ }
3161
+ } catch ($p) {
3162
+ var e = $p;
3163
+ if (this.w8_1 === 4) {
3164
+ throw e;
3165
+ } else {
3166
+ this.v8_1 = this.w8_1;
3167
+ this.y8_1 = e;
3168
+ }
3169
+ }
3170
+ while (true);
3171
+ };
3172
+ function $storeCertificateChain$suspendBridgeCOROUTINE$(_this__u8e3s4, alias, certificates, keyInfo, resultContinuation) {
3173
+ CoroutineImpl.call(this, resultContinuation);
3174
+ this.s5z_1 = _this__u8e3s4;
3175
+ this.t5z_1 = alias;
3176
+ this.u5z_1 = certificates;
3177
+ this.v5z_1 = keyInfo;
3178
+ }
3179
+ protoOf($storeCertificateChain$suspendBridgeCOROUTINE$).d9 = function () {
3180
+ var suspendResult = this.x8_1;
3181
+ $sm: do
3182
+ try {
3183
+ var tmp = this.v8_1;
3184
+ switch (tmp) {
3185
+ case 0:
3186
+ this.w8_1 = 4;
3187
+ if (this.s5z_1.storeCertificateChain === protoOf(MemoryKeyStoreService).storeCertificateChain) {
3188
+ this.v8_1 = 2;
3189
+ suspendResult = this.s5z_1.q49(this.t5z_1, this.u5z_1, this.v5z_1, this);
3190
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3191
+ return suspendResult;
3192
+ }
3193
+ continue $sm;
3194
+ } else {
3195
+ this.v8_1 = 1;
3196
+ suspendResult = await_0(this.s5z_1.storeCertificateChain(this.t5z_1, this.u5z_1, this.v5z_1), this);
3197
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3198
+ return suspendResult;
3199
+ }
3200
+ continue $sm;
3201
+ }
3202
+
3203
+ case 1:
3204
+ this.v8_1 = 3;
3205
+ continue $sm;
3206
+ case 2:
3207
+ this.v8_1 = 3;
3208
+ continue $sm;
3209
+ case 3:
3210
+ return Unit_instance;
3211
+ case 4:
3212
+ throw this.y8_1;
3213
+ }
3214
+ } catch ($p) {
3215
+ var e = $p;
3216
+ if (this.w8_1 === 4) {
3217
+ throw e;
3218
+ } else {
3219
+ this.v8_1 = this.w8_1;
3220
+ this.y8_1 = e;
3221
+ }
3222
+ }
3223
+ while (true);
3224
+ };
3225
+ function $listCertificateChainAliases$suspendBridgeCOROUTINE$(_this__u8e3s4, resultContinuation) {
3226
+ CoroutineImpl.call(this, resultContinuation);
3227
+ this.e60_1 = _this__u8e3s4;
3228
+ }
3229
+ protoOf($listCertificateChainAliases$suspendBridgeCOROUTINE$).d9 = function () {
3230
+ var suspendResult = this.x8_1;
3231
+ $sm: do
3232
+ try {
3233
+ var tmp = this.v8_1;
3234
+ switch (tmp) {
3235
+ case 0:
3236
+ this.w8_1 = 4;
3237
+ if (this.e60_1.listCertificateChainAliases === protoOf(MemoryKeyStoreService).listCertificateChainAliases) {
3238
+ this.v8_1 = 2;
3239
+ suspendResult = this.e60_1.s49(this);
3240
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3241
+ return suspendResult;
3242
+ }
3243
+ continue $sm;
3244
+ } else {
3245
+ this.v8_1 = 1;
3246
+ suspendResult = await_0(this.e60_1.listCertificateChainAliases(), this);
3247
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3248
+ return suspendResult;
3249
+ }
3250
+ continue $sm;
3251
+ }
3252
+
3253
+ case 1:
3254
+ this.f60_1 = suspendResult;
3255
+ this.v8_1 = 3;
3256
+ continue $sm;
3257
+ case 2:
3258
+ this.f60_1 = suspendResult;
3259
+ this.v8_1 = 3;
3260
+ continue $sm;
3261
+ case 3:
3262
+ return this.f60_1;
3263
+ case 4:
3264
+ throw this.y8_1;
3265
+ }
3266
+ } catch ($p) {
3267
+ var e = $p;
3268
+ if (this.w8_1 === 4) {
3269
+ throw e;
3270
+ } else {
3271
+ this.v8_1 = this.w8_1;
3272
+ this.y8_1 = e;
3273
+ }
3274
+ }
3275
+ while (true);
3276
+ };
3277
+ function $getCertificateChain$suspendBridgeCOROUTINE$(_this__u8e3s4, alias, resultContinuation) {
3278
+ CoroutineImpl.call(this, resultContinuation);
3279
+ this.o60_1 = _this__u8e3s4;
3280
+ this.p60_1 = alias;
3281
+ }
3282
+ protoOf($getCertificateChain$suspendBridgeCOROUTINE$).d9 = function () {
3283
+ var suspendResult = this.x8_1;
3284
+ $sm: do
3285
+ try {
3286
+ var tmp = this.v8_1;
3287
+ switch (tmp) {
3288
+ case 0:
3289
+ this.w8_1 = 4;
3290
+ if (this.o60_1.getCertificateChain === protoOf(MemoryKeyStoreService).getCertificateChain) {
3291
+ this.v8_1 = 2;
3292
+ suspendResult = this.o60_1.u49(this.p60_1, this);
3293
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3294
+ return suspendResult;
3295
+ }
3296
+ continue $sm;
3297
+ } else {
3298
+ this.v8_1 = 1;
3299
+ suspendResult = await_0(this.o60_1.getCertificateChain(this.p60_1), this);
3300
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3301
+ return suspendResult;
3302
+ }
3303
+ continue $sm;
3304
+ }
3305
+
3306
+ case 1:
3307
+ this.q60_1 = suspendResult;
3308
+ this.v8_1 = 3;
3309
+ continue $sm;
3310
+ case 2:
3311
+ this.q60_1 = suspendResult;
3312
+ this.v8_1 = 3;
3313
+ continue $sm;
3314
+ case 3:
3315
+ return this.q60_1;
3316
+ case 4:
3317
+ throw this.y8_1;
3318
+ }
3319
+ } catch ($p) {
3320
+ var e = $p;
3321
+ if (this.w8_1 === 4) {
3322
+ throw e;
3323
+ } else {
3324
+ this.v8_1 = this.w8_1;
3325
+ this.y8_1 = e;
3326
+ }
3327
+ }
3328
+ while (true);
3329
+ };
3330
+ function $deleteCertificateChain$suspendBridgeCOROUTINE$(_this__u8e3s4, alias, resultContinuation) {
3331
+ CoroutineImpl.call(this, resultContinuation);
3332
+ this.z60_1 = _this__u8e3s4;
3333
+ this.a61_1 = alias;
3334
+ }
3335
+ protoOf($deleteCertificateChain$suspendBridgeCOROUTINE$).d9 = function () {
3336
+ var suspendResult = this.x8_1;
3337
+ $sm: do
3338
+ try {
3339
+ var tmp = this.v8_1;
3340
+ switch (tmp) {
3341
+ case 0:
3342
+ this.w8_1 = 4;
3343
+ if (this.z60_1.deleteCertificateChain === protoOf(MemoryKeyStoreService).deleteCertificateChain) {
3344
+ this.v8_1 = 2;
3345
+ suspendResult = this.z60_1.w49(this.a61_1, this);
3346
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3347
+ return suspendResult;
3348
+ }
3349
+ continue $sm;
3350
+ } else {
3351
+ this.v8_1 = 1;
3352
+ suspendResult = await_0(this.z60_1.deleteCertificateChain(this.a61_1), this);
3353
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3354
+ return suspendResult;
3355
+ }
3356
+ continue $sm;
3357
+ }
3358
+
3359
+ case 1:
3360
+ this.b61_1 = suspendResult;
3361
+ this.v8_1 = 3;
3362
+ continue $sm;
3363
+ case 2:
3364
+ this.b61_1 = suspendResult;
3365
+ this.v8_1 = 3;
3366
+ continue $sm;
3367
+ case 3:
3368
+ return this.b61_1;
3369
+ case 4:
3370
+ throw this.y8_1;
3371
+ }
3372
+ } catch ($p) {
3373
+ var e = $p;
3374
+ if (this.w8_1 === 4) {
3375
+ throw e;
3376
+ } else {
3377
+ this.v8_1 = this.w8_1;
3378
+ this.y8_1 = e;
3379
+ }
3380
+ }
3381
+ while (true);
3382
+ };
3383
+ function $storeTrustedCertificate$suspendBridgeCOROUTINE$(_this__u8e3s4, alias, certificate, resultContinuation) {
3384
+ CoroutineImpl.call(this, resultContinuation);
3385
+ this.k61_1 = _this__u8e3s4;
3386
+ this.l61_1 = alias;
3387
+ this.m61_1 = certificate;
3388
+ }
3389
+ protoOf($storeTrustedCertificate$suspendBridgeCOROUTINE$).d9 = function () {
3390
+ var suspendResult = this.x8_1;
3391
+ $sm: do
3392
+ try {
3393
+ var tmp = this.v8_1;
3394
+ switch (tmp) {
3395
+ case 0:
3396
+ this.w8_1 = 4;
3397
+ if (this.k61_1.storeTrustedCertificate === protoOf(MemoryKeyStoreService).storeTrustedCertificate) {
3398
+ this.v8_1 = 2;
3399
+ suspendResult = this.k61_1.y49(this.l61_1, this.m61_1, this);
3400
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3401
+ return suspendResult;
3402
+ }
3403
+ continue $sm;
3404
+ } else {
3405
+ this.v8_1 = 1;
3406
+ suspendResult = await_0(this.k61_1.storeTrustedCertificate(this.l61_1, this.m61_1), this);
3407
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3408
+ return suspendResult;
3409
+ }
3410
+ continue $sm;
3411
+ }
3412
+
3413
+ case 1:
3414
+ this.v8_1 = 3;
3415
+ continue $sm;
3416
+ case 2:
3417
+ this.v8_1 = 3;
3418
+ continue $sm;
3419
+ case 3:
3420
+ return Unit_instance;
3421
+ case 4:
3422
+ throw this.y8_1;
3423
+ }
3424
+ } catch ($p) {
3425
+ var e = $p;
3426
+ if (this.w8_1 === 4) {
3427
+ throw e;
3428
+ } else {
3429
+ this.v8_1 = this.w8_1;
3430
+ this.y8_1 = e;
3431
+ }
3432
+ }
3433
+ while (true);
3434
+ };
3435
+ function $listCertificateAliases$suspendBridgeCOROUTINE$(_this__u8e3s4, resultContinuation) {
3436
+ CoroutineImpl.call(this, resultContinuation);
3437
+ this.v61_1 = _this__u8e3s4;
3438
+ }
3439
+ protoOf($listCertificateAliases$suspendBridgeCOROUTINE$).d9 = function () {
3440
+ var suspendResult = this.x8_1;
3441
+ $sm: do
3442
+ try {
3443
+ var tmp = this.v8_1;
3444
+ switch (tmp) {
3445
+ case 0:
3446
+ this.w8_1 = 4;
3447
+ if (this.v61_1.listCertificateAliases === protoOf(MemoryKeyStoreService).listCertificateAliases) {
3448
+ this.v8_1 = 2;
3449
+ suspendResult = this.v61_1.a4a(this);
3450
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3451
+ return suspendResult;
3452
+ }
3453
+ continue $sm;
3454
+ } else {
3455
+ this.v8_1 = 1;
3456
+ suspendResult = await_0(this.v61_1.listCertificateAliases(), this);
3457
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3458
+ return suspendResult;
3459
+ }
3460
+ continue $sm;
3461
+ }
3462
+
3463
+ case 1:
3464
+ this.w61_1 = suspendResult;
3465
+ this.v8_1 = 3;
3466
+ continue $sm;
3467
+ case 2:
3468
+ this.w61_1 = suspendResult;
3469
+ this.v8_1 = 3;
3470
+ continue $sm;
3471
+ case 3:
3472
+ return this.w61_1;
3473
+ case 4:
3474
+ throw this.y8_1;
3475
+ }
3476
+ } catch ($p) {
3477
+ var e = $p;
3478
+ if (this.w8_1 === 4) {
3479
+ throw e;
3480
+ } else {
3481
+ this.v8_1 = this.w8_1;
3482
+ this.y8_1 = e;
3483
+ }
3484
+ }
3485
+ while (true);
3486
+ };
3487
+ function $getCertificate$suspendBridgeCOROUTINE$(_this__u8e3s4, alias, resultContinuation) {
3488
+ CoroutineImpl.call(this, resultContinuation);
3489
+ this.f62_1 = _this__u8e3s4;
3490
+ this.g62_1 = alias;
3491
+ }
3492
+ protoOf($getCertificate$suspendBridgeCOROUTINE$).d9 = function () {
3493
+ var suspendResult = this.x8_1;
3494
+ $sm: do
3495
+ try {
3496
+ var tmp = this.v8_1;
3497
+ switch (tmp) {
3498
+ case 0:
3499
+ this.w8_1 = 4;
3500
+ if (this.f62_1.getCertificate === protoOf(MemoryKeyStoreService).getCertificate) {
3501
+ this.v8_1 = 2;
3502
+ suspendResult = this.f62_1.c4a(this.g62_1, this);
3503
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3504
+ return suspendResult;
3505
+ }
3506
+ continue $sm;
3507
+ } else {
3508
+ this.v8_1 = 1;
3509
+ suspendResult = await_0(this.f62_1.getCertificate(this.g62_1), this);
3510
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3511
+ return suspendResult;
3512
+ }
3513
+ continue $sm;
3514
+ }
3515
+
3516
+ case 1:
3517
+ this.h62_1 = suspendResult;
3518
+ this.v8_1 = 3;
3519
+ continue $sm;
3520
+ case 2:
3521
+ this.h62_1 = suspendResult;
3522
+ this.v8_1 = 3;
3523
+ continue $sm;
3524
+ case 3:
3525
+ return this.h62_1;
3526
+ case 4:
3527
+ throw this.y8_1;
3528
+ }
3529
+ } catch ($p) {
3530
+ var e = $p;
3531
+ if (this.w8_1 === 4) {
3532
+ throw e;
3533
+ } else {
3534
+ this.v8_1 = this.w8_1;
3535
+ this.y8_1 = e;
3536
+ }
3537
+ }
3538
+ while (true);
3539
+ };
3540
+ function $deleteCertificate$suspendBridgeCOROUTINE$(_this__u8e3s4, alias, resultContinuation) {
3541
+ CoroutineImpl.call(this, resultContinuation);
3542
+ this.q62_1 = _this__u8e3s4;
3543
+ this.r62_1 = alias;
3544
+ }
3545
+ protoOf($deleteCertificate$suspendBridgeCOROUTINE$).d9 = function () {
3546
+ var suspendResult = this.x8_1;
3547
+ $sm: do
3548
+ try {
3549
+ var tmp = this.v8_1;
3550
+ switch (tmp) {
3551
+ case 0:
3552
+ this.w8_1 = 4;
3553
+ if (this.q62_1.deleteCertificate === protoOf(MemoryKeyStoreService).deleteCertificate) {
3554
+ this.v8_1 = 2;
3555
+ suspendResult = this.q62_1.e4a(this.r62_1, this);
3556
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3557
+ return suspendResult;
3558
+ }
3559
+ continue $sm;
3560
+ } else {
3561
+ this.v8_1 = 1;
3562
+ suspendResult = await_0(this.q62_1.deleteCertificate(this.r62_1), this);
3563
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3564
+ return suspendResult;
3565
+ }
3566
+ continue $sm;
3567
+ }
3568
+
3569
+ case 1:
3570
+ this.s62_1 = suspendResult;
3571
+ this.v8_1 = 3;
3572
+ continue $sm;
3573
+ case 2:
3574
+ this.s62_1 = suspendResult;
3575
+ this.v8_1 = 3;
3576
+ continue $sm;
3577
+ case 3:
3578
+ return this.s62_1;
3579
+ case 4:
3580
+ throw this.y8_1;
3581
+ }
3582
+ } catch ($p) {
3583
+ var e = $p;
3584
+ if (this.w8_1 === 4) {
3585
+ throw e;
3586
+ } else {
3587
+ this.v8_1 = this.w8_1;
3588
+ this.y8_1 = e;
3589
+ }
3590
+ }
3591
+ while (true);
3592
+ };
3593
+ function $listKeys$suspendBridgeCOROUTINE$_2(_this__u8e3s4, filter, resultContinuation) {
3594
+ CoroutineImpl.call(this, resultContinuation);
3595
+ this.b63_1 = _this__u8e3s4;
3596
+ this.c63_1 = filter;
3597
+ }
3598
+ protoOf($listKeys$suspendBridgeCOROUTINE$_2).d9 = function () {
3599
+ var suspendResult = this.x8_1;
3600
+ $sm: do
3601
+ try {
3602
+ var tmp = this.v8_1;
3603
+ switch (tmp) {
3604
+ case 0:
3605
+ this.w8_1 = 4;
3606
+ if (this.b63_1.listKeysFiltered === protoOf(KeyStoreService).listKeysFiltered) {
3607
+ this.v8_1 = 2;
3608
+ suspendResult = this.b63_1.d4i(this.c63_1, this);
3609
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3610
+ return suspendResult;
3611
+ }
3612
+ continue $sm;
3613
+ } else {
3614
+ this.v8_1 = 1;
3615
+ suspendResult = await_0(this.b63_1.listKeysFiltered(this.c63_1), this);
3616
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
3617
+ return suspendResult;
3618
+ }
3619
+ continue $sm;
3620
+ }
3621
+
3622
+ case 1:
3623
+ this.d63_1 = suspendResult;
3624
+ this.v8_1 = 3;
3625
+ continue $sm;
3626
+ case 2:
3627
+ this.d63_1 = suspendResult;
3628
+ this.v8_1 = 3;
3629
+ continue $sm;
3630
+ case 3:
3631
+ return this.d63_1;
3632
+ case 4:
3633
+ throw this.y8_1;
3634
+ }
3635
+ } catch ($p) {
3636
+ var e = $p;
3637
+ if (this.w8_1 === 4) {
3638
+ throw e;
3639
+ } else {
3640
+ this.v8_1 = this.w8_1;
3641
+ this.y8_1 = e;
3642
+ }
3643
+ }
3644
+ while (true);
3645
+ };
3646
+ function MemoryKeyStoreService(config, backingStorage, partitionKey) {
3647
+ backingStorage = backingStorage === VOID ? null : backingStorage;
3648
+ partitionKey = partitionKey === VOID ? null : partitionKey;
3649
+ this.r5w_1 = config;
3650
+ this.s5w_1 = backingStorage;
3651
+ this.t5w_1 = partitionKey;
3652
+ this.u5w_1 = this.r5w_1.id;
3653
+ this.v5w_1 = this.r5w_1.keyStoreType;
3654
+ var tmp = this;
3655
+ // Inline function 'kotlin.collections.toTypedArray' call
3656
+ var this_0 = Companion_instance.x2r();
3657
+ tmp.w5w_1 = copyToArray(this_0);
3658
+ var tmp_0 = this;
3659
+ // Inline function 'kotlin.collections.toTypedArray' call
3660
+ var this_1 = Companion_instance_0.x2r();
3661
+ tmp_0.x5w_1 = copyToArray(this_1);
3662
+ var tmp_1 = this;
3663
+ // Inline function 'kotlin.collections.mutableMapOf' call
3664
+ tmp_1.y5w_1 = LinkedHashMap_init_$Create$_0();
3665
+ var tmp_2 = this;
3666
+ // Inline function 'kotlin.collections.mutableMapOf' call
3667
+ tmp_2.z5w_1 = LinkedHashMap_init_$Create$_0();
3668
+ var tmp_3 = this;
3669
+ // Inline function 'kotlin.collections.mutableMapOf' call
3670
+ tmp_3.a5x_1 = LinkedHashMap_init_$Create$_0();
3671
+ // Inline function 'kotlin.require' call
3672
+ if (!(this.r5w_1.keyStoreType === PredefinedKeyStoreTypes_MEMORY_getInstance().n4t_1)) {
3673
+ var message = 'A memory keystore needs to be of config type MEMORY';
3674
+ throw IllegalArgumentException_init_$Create$(toString(message));
3675
+ }
3676
+ }
3677
+ protoOf(MemoryKeyStoreService).x24 = function () {
3678
+ return this.u5w_1;
3679
+ };
3680
+ protoOf(MemoryKeyStoreService).r4i = function () {
3681
+ return this.v5w_1;
3682
+ };
3683
+ protoOf(MemoryKeyStoreService).w4i = function () {
3684
+ return this.w5w_1;
3685
+ };
3686
+ protoOf(MemoryKeyStoreService).x4i = function () {
3687
+ return this.x5w_1;
3688
+ };
3689
+ protoOf(MemoryKeyStoreService).b4i = function () {
3690
+ return null;
3691
+ };
3692
+ protoOf(MemoryKeyStoreService).exposesPrivateKeysForSigning = function () {
3693
+ return true;
3694
+ };
3695
+ protoOf(MemoryKeyStoreService).keyVisibility = function () {
3696
+ return Companion_getInstance_0().k3s(this.r5w_1.keyVisibility);
3697
+ };
3698
+ protoOf(MemoryKeyStoreService).c4i = function ($completion) {
3699
+ // Inline function 'kotlin.collections.map' call
3700
+ var this_0 = _get_keys__d97k5z(this);
3701
+ // Inline function 'kotlin.collections.mapTo' call
3702
+ var destination = ArrayList_init_$Create$(this_0.l1());
3703
+ // Inline function 'kotlin.collections.iterator' call
3704
+ var _iterator__ex2g4s = this_0.q1().t();
3705
+ while (_iterator__ex2g4s.u()) {
3706
+ var item = _iterator__ex2g4s.v();
3707
+ var tmp$ret$3 = toKeyReference(item.t2());
3708
+ destination.j1(tmp$ret$3);
3709
+ }
3710
+ // Inline function 'kotlin.collections.toTypedArray' call
3711
+ return copyToArray(destination);
3712
+ };
3713
+ protoOf(MemoryKeyStoreService).listKeys = function () {
3714
+ var tmp = this;
3715
+ return promisify(function ($completion) {
3716
+ return tmp.c4i($completion);
3717
+ });
3718
+ };
3719
+ protoOf(MemoryKeyStoreService).h4h = function ($completion) {
3720
+ var tmp = new $listKeys$suspendBridgeCOROUTINE$_1(this, $completion);
3721
+ tmp.x8_1 = Unit_instance;
3722
+ tmp.y8_1 = null;
3723
+ return tmp.d9();
3724
+ };
3725
+ protoOf(MemoryKeyStoreService).e4i = function (keyInfo, $completion) {
3726
+ var managedKeyInfo = keyInfo;
3727
+ if (managedKeyInfo.m3n() === null) {
3728
+ // Inline function 'kotlin.collections.find' call
3729
+ var tmp0 = _get_keys__d97k5z(this).z2();
3730
+ var tmp$ret$1;
3731
+ $l$block: {
3732
+ // Inline function 'kotlin.collections.firstOrNull' call
3733
+ var _iterator__ex2g4s = tmp0.t();
3734
+ while (_iterator__ex2g4s.u()) {
3735
+ var element = _iterator__ex2g4s.v();
3736
+ var tmp;
3737
+ if (!(keyInfo.j3n() === null) && element.j3n() == keyInfo.j3n()) {
3738
+ tmp = true;
3739
+ } else {
3740
+ var tmp_0;
3741
+ var tmp0_safe_receiver = keyInfo.key;
3742
+ if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.getXAsString()) == element.key.getXAsString()) {
3743
+ var tmp1_safe_receiver = keyInfo.key;
3744
+ tmp_0 = (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.getYAsString()) == element.key.getYAsString();
3745
+ } else {
3746
+ tmp_0 = false;
3747
+ }
3748
+ tmp = tmp_0;
3749
+ }
3750
+ if (tmp) {
3751
+ tmp$ret$1 = element;
3752
+ break $l$block;
3753
+ }
3754
+ }
3755
+ tmp$ret$1 = null;
3756
+ }
3757
+ var matchingKey = tmp$ret$1;
3758
+ if (!(matchingKey == null)) {
3759
+ managedKeyInfo = matchingKey;
3760
+ }
3761
+ }
3762
+ // Inline function 'kotlin.require' call
3763
+ if (!(!(managedKeyInfo.key === null) || !(managedKeyInfo.j3n() === null) || !(managedKeyInfo.m3n() === null))) {
3764
+ var message = 'Either a kid needs to be provided or a key needs to be passed in';
3765
+ throw IllegalArgumentException_init_$Create$(toString(message));
3766
+ }
3767
+ var tmp0_elvis_lhs = managedKeyInfo.keyVisibility;
3768
+ var visibility = tmp0_elvis_lhs == null ? this.r5w_1.keyVisibility : tmp0_elvis_lhs;
3769
+ if (this.r5w_1.keyVisibility === KeyVisibility_PUBLIC_getInstance().n3s_1 && visibility === KeyVisibility_PRIVATE_getInstance()) {
3770
+ throw new PKIException('Cannot get private key info for a public key store');
3771
+ }
3772
+ var tmp1_elvis_lhs = managedKeyInfo.j3n();
3773
+ var tmp_1;
3774
+ if (tmp1_elvis_lhs == null) {
3775
+ var tmp2_safe_receiver = managedKeyInfo.key;
3776
+ tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.kid;
3777
+ } else {
3778
+ tmp_1 = tmp1_elvis_lhs;
3779
+ }
3780
+ var kid = tmp_1;
3781
+ var alias = managedKeyInfo.m3n();
3782
+ // Inline function 'kotlin.require' call
3783
+ if (!!(alias === null)) {
3784
+ var message_0 = 'Need to provide a alias';
3785
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
3786
+ }
3787
+ var keyInfoResult = _get_keys__d97k5z(this).x2(alias);
3788
+ // Inline function 'kotlin.require' call
3789
+ if (!!(keyInfoResult === null)) {
3790
+ var message_1 = 'Could not find key for alias ' + alias + ', kid ' + toString_0(kid);
3791
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
3792
+ }
3793
+ var tmp_2;
3794
+ if (visibility === KeyVisibility_PUBLIC_getInstance()) {
3795
+ tmp_2 = new ManagedKeyInfo(alias, keyInfoResult.l3n(), keyInfoResult.toResolvedPublicKeyInfo());
3796
+ } else {
3797
+ if (!(keyInfoResult.keyVisibility === KeyVisibility_PRIVATE_getInstance())) {
3798
+ throw IllegalArgumentException_init_$Create$('Key with alias ' + alias + ' is not a private key, whilst a private key is requested');
3799
+ }
3800
+ tmp_2 = keyInfoResult;
3801
+ }
3802
+ return tmp_2;
3803
+ };
3804
+ protoOf(MemoryKeyStoreService).getKey = function (keyInfo) {
3805
+ var tmp = this;
3806
+ return promisify(function ($completion) {
3807
+ return tmp.e4i(keyInfo, $completion);
3808
+ });
3809
+ };
3810
+ protoOf(MemoryKeyStoreService).y4h = function (keyInfo, $completion) {
3811
+ var tmp = new $getKey$suspendBridgeCOROUTINE$_0(this, keyInfo, $completion);
3812
+ tmp.x8_1 = Unit_instance;
3813
+ tmp.y8_1 = null;
3814
+ return tmp.d9();
3815
+ };
3816
+ protoOf(MemoryKeyStoreService).g4i = function (keyInfo, $completion) {
3817
+ var tmp = new $deleteKeyCOROUTINE$_0(this, keyInfo, $completion);
3818
+ tmp.x8_1 = Unit_instance;
3819
+ tmp.y8_1 = null;
3820
+ return tmp.d9();
3821
+ };
3822
+ protoOf(MemoryKeyStoreService).deleteKey = function (keyInfo) {
3823
+ var tmp = this;
3824
+ return promisify(function ($completion) {
3825
+ return tmp.g4i(keyInfo, $completion);
3826
+ });
3827
+ };
3828
+ protoOf(MemoryKeyStoreService).a4i = function (keyInfo, $completion) {
3829
+ var tmp = new $deleteKey$suspendBridgeCOROUTINE$_0(this, keyInfo, $completion);
3830
+ tmp.x8_1 = Unit_instance;
3831
+ tmp.y8_1 = null;
3832
+ return tmp.d9();
3833
+ };
3834
+ protoOf(MemoryKeyStoreService).f4i = function (keyInfo, providerId, alias, certChain, $completion) {
3835
+ var tmp0_elvis_lhs = keyInfo.keyVisibility;
3836
+ var visibility = tmp0_elvis_lhs == null ? this.r5w_1.keyVisibility : tmp0_elvis_lhs;
3837
+ if (this.r5w_1.keyVisibility === KeyVisibility_PUBLIC_getInstance().n3s_1 && visibility === KeyVisibility_PRIVATE_getInstance()) {
3838
+ throw new PKIException('Cannot get private key info for a public key store');
3839
+ }
3840
+ var managedKeyInfo = new ManagedKeyInfo(alias, providerId, keyInfo);
3841
+ if (!this.r5w_1.overwriteAlias) {
3842
+ // Inline function 'kotlin.check' call
3843
+ if (!!_get_keys__d97k5z(this).v2(alias)) {
3844
+ var message = 'Cannot overwrite key alias ' + alias + ', as alias already exists in keystore and overwriting is not enabled';
3845
+ throw IllegalStateException_init_$Create$(toString(message));
3846
+ }
3847
+ }
3848
+ // Inline function 'kotlin.collections.set' call
3849
+ _get_keys__d97k5z(this).j3(alias, managedKeyInfo);
3850
+ return managedKeyInfo;
3851
+ };
3852
+ protoOf(MemoryKeyStoreService).storeKey = function (keyInfo, providerId, alias, certChain) {
3853
+ var tmp = this;
3854
+ return promisify(function ($completion) {
3855
+ return tmp.x4e(keyInfo, providerId, alias, certChain, $completion);
3856
+ });
3857
+ };
3858
+ protoOf(MemoryKeyStoreService).z4h = function (keyInfo, providerId, alias, certChain, $completion) {
3859
+ var tmp = new $storeKey$suspendBridgeCOROUTINE$_0(this, keyInfo, providerId, alias, certChain, $completion);
3860
+ tmp.x8_1 = Unit_instance;
3861
+ tmp.y8_1 = null;
3862
+ return tmp.d9();
3863
+ };
3864
+ protoOf(MemoryKeyStoreService).p49 = function (alias, certificates, keyInfo, $completion) {
3865
+ if (!this.r5w_1.overwriteAlias) {
3866
+ // Inline function 'kotlin.check' call
3867
+ if (!!_get_certificateChains__l5yeco(this).v2(alias)) {
3868
+ var message = 'Cannot overwrite certificate chain alias ' + alias + ', as alias already exists in keystore and overwriting is not enabled';
3869
+ throw IllegalStateException_init_$Create$(toString(message));
3870
+ }
3871
+ }
3872
+ if (certificates.length === 1) {
3873
+ var tmp0 = _get_certificates__eymdpt(this);
3874
+ // Inline function 'kotlin.collections.set' call
3875
+ var value = certificates[0];
3876
+ tmp0.j3(alias, value);
3877
+ }
3878
+ // Inline function 'kotlin.collections.set' call
3879
+ _get_certificateChains__l5yeco(this).j3(alias, certificates);
3880
+ return Unit_instance;
3881
+ };
3882
+ protoOf(MemoryKeyStoreService).storeCertificateChain = function (alias, certificates, keyInfo) {
3883
+ var tmp = this;
3884
+ return promisify(function ($completion) {
3885
+ return tmp.q49(alias, certificates, keyInfo, $completion);
3886
+ });
3887
+ };
3888
+ protoOf(MemoryKeyStoreService).r49 = function (alias, certificates, keyInfo, $completion) {
3889
+ var tmp = new $storeCertificateChain$suspendBridgeCOROUTINE$(this, alias, certificates, keyInfo, $completion);
3890
+ tmp.x8_1 = Unit_instance;
3891
+ tmp.y8_1 = null;
3892
+ return tmp.d9();
3893
+ };
3894
+ protoOf(MemoryKeyStoreService).s49 = function ($completion) {
3895
+ // Inline function 'kotlin.collections.toTypedArray' call
3896
+ var this_0 = _get_certificateChains__l5yeco(this).y2();
3897
+ return copyToArray(this_0);
3898
+ };
3899
+ protoOf(MemoryKeyStoreService).listCertificateChainAliases = function () {
3900
+ var tmp = this;
3901
+ return promisify(function ($completion) {
3902
+ return tmp.s49($completion);
3903
+ });
3904
+ };
3905
+ protoOf(MemoryKeyStoreService).t49 = function ($completion) {
3906
+ var tmp = new $listCertificateChainAliases$suspendBridgeCOROUTINE$(this, $completion);
3907
+ tmp.x8_1 = Unit_instance;
3908
+ tmp.y8_1 = null;
3909
+ return tmp.d9();
3910
+ };
3911
+ protoOf(MemoryKeyStoreService).u49 = function (alias, $completion) {
3912
+ var tmp0_elvis_lhs = _get_certificateChains__l5yeco(this).x2(alias);
3913
+ var tmp;
3914
+ if (tmp0_elvis_lhs == null) {
3915
+ var tmp1_safe_receiver = _get_certificates__eymdpt(this).x2(alias);
3916
+ var tmp_0;
3917
+ if (tmp1_safe_receiver == null) {
3918
+ tmp_0 = null;
3919
+ } else {
3920
+ // Inline function 'kotlin.let' call
3921
+ // Inline function 'kotlin.arrayOf' call
3922
+ // Inline function 'kotlin.js.unsafeCast' call
3923
+ // Inline function 'kotlin.js.asDynamic' call
3924
+ tmp_0 = [tmp1_safe_receiver];
3925
+ }
3926
+ tmp = tmp_0;
3927
+ } else {
3928
+ tmp = tmp0_elvis_lhs;
3929
+ }
3930
+ var tmp2_elvis_lhs = tmp;
3931
+ var tmp_1;
3932
+ if (tmp2_elvis_lhs == null) {
3933
+ throw new NotFoundException('Could not find certificate chain for alias ' + alias);
3934
+ } else {
3935
+ tmp_1 = tmp2_elvis_lhs;
3936
+ }
3937
+ return tmp_1;
3938
+ };
3939
+ protoOf(MemoryKeyStoreService).getCertificateChain = function (alias) {
3940
+ var tmp = this;
3941
+ return promisify(function ($completion) {
3942
+ return tmp.u49(alias, $completion);
3943
+ });
3944
+ };
3945
+ protoOf(MemoryKeyStoreService).v49 = function (alias, $completion) {
3946
+ var tmp = new $getCertificateChain$suspendBridgeCOROUTINE$(this, alias, $completion);
3947
+ tmp.x8_1 = Unit_instance;
3948
+ tmp.y8_1 = null;
3949
+ return tmp.d9();
3950
+ };
3951
+ protoOf(MemoryKeyStoreService).w49 = function (alias, $completion) {
3952
+ return !(_get_certificateChains__l5yeco(this).k3(alias) == null);
3953
+ };
3954
+ protoOf(MemoryKeyStoreService).deleteCertificateChain = function (alias) {
3955
+ var tmp = this;
3956
+ return promisify(function ($completion) {
3957
+ return tmp.w49(alias, $completion);
3958
+ });
3959
+ };
3960
+ protoOf(MemoryKeyStoreService).x49 = function (alias, $completion) {
3961
+ var tmp = new $deleteCertificateChain$suspendBridgeCOROUTINE$(this, alias, $completion);
3962
+ tmp.x8_1 = Unit_instance;
3963
+ tmp.y8_1 = null;
3964
+ return tmp.d9();
3965
+ };
3966
+ protoOf(MemoryKeyStoreService).y49 = function (alias, certificate, $completion) {
3967
+ if (!this.r5w_1.overwriteAlias) {
3968
+ // Inline function 'kotlin.check' call
3969
+ if (!!_get_certificates__eymdpt(this).v2(alias)) {
3970
+ var message = 'Cannot overwrite certificate alias ' + alias + ', as alias already exists in keystore and overwriting is not enabled';
3971
+ throw IllegalStateException_init_$Create$(toString(message));
3972
+ }
3973
+ }
3974
+ // Inline function 'kotlin.collections.set' call
3975
+ _get_certificates__eymdpt(this).j3(alias, certificate);
3976
+ return Unit_instance;
3977
+ };
3978
+ protoOf(MemoryKeyStoreService).storeTrustedCertificate = function (alias, certificate) {
3979
+ var tmp = this;
3980
+ return promisify(function ($completion) {
3981
+ return tmp.y49(alias, certificate, $completion);
3982
+ });
3983
+ };
3984
+ protoOf(MemoryKeyStoreService).z49 = function (alias, certificate, $completion) {
3985
+ var tmp = new $storeTrustedCertificate$suspendBridgeCOROUTINE$(this, alias, certificate, $completion);
3986
+ tmp.x8_1 = Unit_instance;
3987
+ tmp.y8_1 = null;
3988
+ return tmp.d9();
3989
+ };
3990
+ protoOf(MemoryKeyStoreService).a4a = function ($completion) {
3991
+ // Inline function 'kotlin.collections.toTypedArray' call
3992
+ var this_0 = _get_certificates__eymdpt(this).y2();
3993
+ return copyToArray(this_0);
3994
+ };
3995
+ protoOf(MemoryKeyStoreService).listCertificateAliases = function () {
3996
+ var tmp = this;
3997
+ return promisify(function ($completion) {
3998
+ return tmp.a4a($completion);
3999
+ });
4000
+ };
4001
+ protoOf(MemoryKeyStoreService).b4a = function ($completion) {
4002
+ var tmp = new $listCertificateAliases$suspendBridgeCOROUTINE$(this, $completion);
4003
+ tmp.x8_1 = Unit_instance;
4004
+ tmp.y8_1 = null;
4005
+ return tmp.d9();
4006
+ };
4007
+ protoOf(MemoryKeyStoreService).c4a = function (alias, $completion) {
4008
+ var tmp0_elvis_lhs = _get_certificates__eymdpt(this).x2(alias);
4009
+ var tmp;
4010
+ if (tmp0_elvis_lhs == null) {
4011
+ var tmp1_safe_receiver = _get_certificateChains__l5yeco(this).x2(alias);
4012
+ tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver[0];
4013
+ } else {
4014
+ tmp = tmp0_elvis_lhs;
4015
+ }
4016
+ var tmp2_elvis_lhs = tmp;
4017
+ var tmp_0;
4018
+ if (tmp2_elvis_lhs == null) {
4019
+ throw new NotFoundException('Could not find certificate for alias ' + alias);
4020
+ } else {
4021
+ tmp_0 = tmp2_elvis_lhs;
4022
+ }
4023
+ return tmp_0;
4024
+ };
4025
+ protoOf(MemoryKeyStoreService).getCertificate = function (alias) {
4026
+ var tmp = this;
4027
+ return promisify(function ($completion) {
4028
+ return tmp.c4a(alias, $completion);
4029
+ });
4030
+ };
4031
+ protoOf(MemoryKeyStoreService).d4a = function (alias, $completion) {
4032
+ var tmp = new $getCertificate$suspendBridgeCOROUTINE$(this, alias, $completion);
4033
+ tmp.x8_1 = Unit_instance;
4034
+ tmp.y8_1 = null;
4035
+ return tmp.d9();
4036
+ };
4037
+ protoOf(MemoryKeyStoreService).e4a = function (alias, $completion) {
4038
+ return !(_get_certificates__eymdpt(this).k3(alias) == null);
4039
+ };
4040
+ protoOf(MemoryKeyStoreService).deleteCertificate = function (alias) {
4041
+ var tmp = this;
4042
+ return promisify(function ($completion) {
4043
+ return tmp.e4a(alias, $completion);
4044
+ });
4045
+ };
4046
+ protoOf(MemoryKeyStoreService).f4a = function (alias, $completion) {
4047
+ var tmp = new $deleteCertificate$suspendBridgeCOROUTINE$(this, alias, $completion);
4048
+ tmp.x8_1 = Unit_instance;
4049
+ tmp.y8_1 = null;
4050
+ return tmp.d9();
4051
+ };
4052
+ protoOf(MemoryKeyStoreService).e63 = function (filter, $completion) {
4053
+ return this.d4i(filter, $completion);
4054
+ };
4055
+ function IX509JSCallback() {
4056
+ }
4057
+ function X509VerifyVerifyPlatformCallbackJSPromises() {
4058
+ }
4059
+ //region block: post-declaration
4060
+ protoOf(KeyManagerServiceImpl).getProviderById = getProviderById;
4061
+ protoOf(KeyManagerServiceImpl).getProvider = getProvider;
4062
+ protoOf(KeyManagerServiceImpl).registerProvider = registerProvider;
4063
+ protoOf(KeyManagerServiceImpl).getResolverById = getResolverById;
4064
+ protoOf(KeyManagerServiceImpl).getResolverByKeyTypeOrIdentifier = getResolverByKeyTypeOrIdentifier;
4065
+ protoOf(KeyManagerServiceImpl).registerResolver = registerResolver;
4066
+ protoOf(KeyManagerServiceImpl).b4e = getAllCapabilities$default;
4067
+ protoOf(KeyManagerServiceImpl).w4e = resolvePublicKey$default;
4068
+ protoOf(KeyManagerServiceImpl).f4e = generateKey$default;
4069
+ protoOf(KeyManagerServiceImpl).d4e = generateKeyAsync$default;
4070
+ protoOf(KeyManagerServiceImpl).h4d = encrypt$default;
4071
+ protoOf(KeyManagerServiceImpl).j4d = decrypt$default;
4072
+ protoOf(KeyManagerServiceImpl).n4d = performKeyAgreement$default;
4073
+ protoOf(KeyManagerServiceImpl).x4e = storeKey$default;
4074
+ protoOf(KeyManagerServiceImpl).h4e = createRawSignatureResult$default;
4075
+ protoOf(KeyManagerServiceImpl).j4e = encryptResult$default;
4076
+ protoOf(KeyManagerServiceImpl).l4e = decryptResult$default;
4077
+ protoOf(KeyManagerServiceImpl).n4e = performKeyAgreementResult$default;
4078
+ protoOf(KeyManagerServiceImpl).p4e = generateKeyResult$default;
4079
+ protoOf(KeyManagerServiceImpl).r4e = listKeysResult$default;
4080
+ protoOf(KeyManagerServiceImpl).t4e = storeKeyResult$default;
4081
+ protoOf(KeyManagerServiceImpl).v4e = resolvePublicKeyResult$default;
4082
+ protoOf(KeyManagerServiceImpl).exposesPrivateKeysForSigning = exposesPrivateKeysForSigning;
4083
+ defineProp(protoOf(KeyManagerServiceImpl), 'settings', function () {
4084
+ return this.b4i();
4085
+ });
4086
+ protoOf(KeyResolverRegistryImpl).getResolverById = getResolverById;
4087
+ protoOf(KeyResolverRegistryImpl).getResolverByKeyTypeOrIdentifier = getResolverByKeyTypeOrIdentifier;
4088
+ protoOf(KeyResolverRegistryImpl).registerResolver = registerResolver;
4089
+ protoOf(KmsProviderRegistryImpl).getProviderById = getProviderById;
4090
+ protoOf(KmsProviderRegistryImpl).getProvider = getProvider;
4091
+ protoOf(KmsProviderRegistryImpl).registerProvider = registerProvider;
4092
+ protoOf(MemoryKeyStoreService).x4e = storeKey$default;
4093
+ protoOf(MemoryKeyStoreService).q49 = storeCertificateChain$default;
4094
+ protoOf(MemoryKeyStoreService).y2o = get_order;
4095
+ protoOf(MemoryKeyStoreService).s4i = get_enabled;
4096
+ protoOf(MemoryKeyStoreService).d4i = listKeys;
4097
+ protoOf(MemoryKeyStoreService).listKeysFiltered = listKeysFiltered;
4098
+ defineProp(protoOf(MemoryKeyStoreService), 'id', function () {
4099
+ return this.x24();
4100
+ });
4101
+ defineProp(protoOf(MemoryKeyStoreService), 'keyStoreType', function () {
4102
+ return this.r4i();
4103
+ });
4104
+ defineProp(protoOf(MemoryKeyStoreService), 'keyTypesSupported', function () {
4105
+ return this.w4i();
4106
+ });
4107
+ defineProp(protoOf(MemoryKeyStoreService), 'signatureAlgorithmsSupported', function () {
4108
+ return this.x4i();
4109
+ });
4110
+ defineProp(protoOf(MemoryKeyStoreService), 'settings', function () {
4111
+ return this.b4i();
4112
+ });
4113
+ defineProp(protoOf(MemoryKeyStoreService), 'order', function () {
4114
+ return this.y2o();
4115
+ });
4116
+ defineProp(protoOf(MemoryKeyStoreService), 'enabled', function () {
4117
+ return this.s4i();
4118
+ });
4119
+ //endregion
4120
+ //region block: init
4121
+ DefaultCallbacks_instance = new DefaultCallbacks();
4122
+ Companion_instance_2 = new Companion();
4123
+ Companion_instance_3 = new Companion_0();
4124
+ Companion_instance_4 = new Companion_1();
4125
+ Companion_instance_5 = new Companion_2();
4126
+ Companion_instance_6 = new Companion_3();
4127
+ //endregion
4128
+ //region block: exports
4129
+ var DefaultCallbacks_0 = {getInstance: DefaultCallbacks_getInstance};
4130
+ KeyManagerServiceImpl.MetroFactory = MetroFactory;
4131
+ defineProp(KeyManagerServiceImpl.MetroFactory, 'Companion', Companion_getInstance_2, VOID, true);
4132
+ var MetroContributionToSessionScope_2 = {};
4133
+ KeyManagerServiceImpl.MetroContributionToSessionScope = MetroContributionToSessionScope_2;
4134
+ KeyManagerServiceImpl.MetroContributionToSessionScope.BindsMirror = BindsMirror;
4135
+ KeyResolverRegistryImpl.MetroFactory = MetroFactory_0;
4136
+ defineProp(KeyResolverRegistryImpl.MetroFactory, 'Companion', Companion_getInstance_3, VOID, true);
4137
+ var MetroContributionToSessionScope_3 = {};
4138
+ KeyResolverRegistryImpl.MetroContributionToSessionScope = MetroContributionToSessionScope_3;
4139
+ KeyResolverRegistryImpl.MetroContributionToSessionScope.BindsMirror = BindsMirror_0;
4140
+ KmsProviderRegistryImpl.MetroFactory = MetroFactory_1;
4141
+ defineProp(KmsProviderRegistryImpl.MetroFactory, 'Companion', Companion_getInstance_4, VOID, true);
4142
+ var MetroContributionToSessionScope_4 = {};
4143
+ KmsProviderRegistryImpl.MetroContributionToSessionScope = MetroContributionToSessionScope_4;
4144
+ KmsProviderRegistryImpl.MetroContributionToSessionScope.BindsMirror = BindsMirror_1;
4145
+ var MemoryKeyStoreServiceFactory_0 = {};
4146
+ MemoryKeyStoreServiceFactory_0.Impl = Impl;
4147
+ defineProp(MemoryKeyStoreServiceFactory_0.Impl, 'Companion', Companion_getInstance_5, VOID, true);
4148
+ export {
4149
+ DefaultCallbacks_0 as DefaultCallbacks,
4150
+ KeyManagerServiceImpl as KeyManagerServiceImpl,
4151
+ KeyResolverRegistryImpl as KeyResolverRegistryImpl,
4152
+ KmsProviderRegistryImpl as KmsProviderRegistryImpl,
4153
+ MemoryKeyStoreServiceFactory_0 as MemoryKeyStoreServiceFactory,
4154
+ };
4155
+ //endregion
4156
+
4157
+ //# sourceMappingURL=idk-lib-crypto-core-impl.mjs.map