@solibo/solibo-sdk 1.0.23 → 1.0.25-SNAPSHOT
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/KmLogging-logging.js +291 -5
- package/KmLogging-logging.js.map +1 -1
- package/Kotlin-DateTime-library-kotlinx-datetime.js +7250 -5
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
- package/KotlinBigInteger-bignum.js +5989 -5
- package/KotlinBigInteger-bignum.js.map +1 -1
- package/MultiplatformSettings-multiplatform-settings-no-arg.js +19 -5
- package/MultiplatformSettings-multiplatform-settings-no-arg.js.map +1 -1
- package/MultiplatformSettings-multiplatform-settings.js +72 -5
- package/MultiplatformSettings-multiplatform-settings.js.map +1 -1
- package/Stately-stately-concurrency.js +27 -5
- package/Stately-stately-concurrency.js.map +1 -1
- package/cryptography-kotlin-cryptography-bigint.js +244 -5
- package/cryptography-kotlin-cryptography-bigint.js.map +1 -1
- package/cryptography-kotlin-cryptography-core.js +957 -60
- package/cryptography-kotlin-cryptography-core.js.map +1 -1
- package/cryptography-kotlin-cryptography-provider-base.js +67 -5
- package/cryptography-kotlin-cryptography-provider-base.js.map +1 -1
- package/cryptography-kotlin-cryptography-provider-webcrypto.js +1151 -13
- package/cryptography-kotlin-cryptography-provider-webcrypto.js.map +1 -1
- package/cryptography-kotlin-cryptography-random.js +77 -8
- package/cryptography-kotlin-cryptography-random.js.map +1 -1
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.js +705 -5
- package/cryptography-kotlin-cryptography-serialization-asn1-modules.js.map +1 -1
- package/cryptography-kotlin-cryptography-serialization-asn1.js +1417 -5
- package/cryptography-kotlin-cryptography-serialization-asn1.js.map +1 -1
- package/cryptography-kotlin-cryptography-serialization-pem.js +155 -5
- package/cryptography-kotlin-cryptography-serialization-pem.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +16616 -1222
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlinx-atomicfu.js +187 -8
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-browser.js +19 -0
- package/kotlinx-browser.js.map +1 -0
- package/kotlinx-coroutines-core.js +9817 -5
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-io-kotlinx-io-bytestring.js +204 -5
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -1
- package/kotlinx-io-kotlinx-io-core.js +2025 -5
- package/kotlinx-io-kotlinx-io-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +6048 -5
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +5073 -5
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/ktor-ktor-client-auth.js +1500 -5
- package/ktor-ktor-client-auth.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +757 -5
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +13613 -36
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-client-logging.js +3276 -5
- package/ktor-ktor-client-logging.js.map +1 -1
- package/ktor-ktor-events.js +84 -5
- package/ktor-ktor-events.js.map +1 -1
- package/ktor-ktor-http-cio.js +2261 -5
- package/ktor-ktor-http-cio.js.map +1 -1
- package/ktor-ktor-http.js +5127 -5
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +3510 -5
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +57 -5
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx.js +855 -5
- package/ktor-ktor-serialization-kotlinx.js.map +1 -1
- package/ktor-ktor-serialization.js +369 -5
- package/ktor-ktor-serialization.js.map +1 -1
- package/ktor-ktor-utils.js +3610 -5
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +2542 -5
- package/ktor-ktor-websockets.js.map +1 -1
- package/package.json +1 -1
- package/solibo-sdk-sdk-home-api.js +5027 -5
- package/solibo-sdk-sdk-home-api.js.map +1 -1
- package/solibo-sdk-sdk.d.ts +118 -0
- package/solibo-sdk-sdk.js +6900 -4
- package/solibo-sdk-sdk.js.map +1 -1
|
@@ -1,13 +1,713 @@
|
|
|
1
1
|
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports'], factory);
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './cryptography-kotlin-cryptography-serialization-asn1.js', './kotlinx-serialization-kotlinx-serialization-core.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports);
|
|
6
|
-
else
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./cryptography-kotlin-cryptography-serialization-asn1.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'cryptography-kotlin-cryptography-serialization-asn1-modules'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'cryptography-kotlin-cryptography-serialization-asn1-modules'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis['cryptography-kotlin-cryptography-serialization-asn1'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'cryptography-kotlin-cryptography-serialization-asn1-modules'. Its dependency 'cryptography-kotlin-cryptography-serialization-asn1' was not found. Please, check whether 'cryptography-kotlin-cryptography-serialization-asn1' is loaded prior to 'cryptography-kotlin-cryptography-serialization-asn1-modules'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'cryptography-kotlin-cryptography-serialization-asn1-modules'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'cryptography-kotlin-cryptography-serialization-asn1-modules'.");
|
|
15
|
+
}
|
|
16
|
+
globalThis['cryptography-kotlin-cryptography-serialization-asn1-modules'] = factory(typeof globalThis['cryptography-kotlin-cryptography-serialization-asn1-modules'] === 'undefined' ? {} : globalThis['cryptography-kotlin-cryptography-serialization-asn1-modules'], globalThis['kotlin-kotlin-stdlib'], globalThis['cryptography-kotlin-cryptography-serialization-asn1'], globalThis['kotlinx-serialization-kotlinx-serialization-core']);
|
|
17
|
+
}
|
|
18
|
+
}(function (_, kotlin_kotlin, kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {
|
|
9
19
|
'use strict';
|
|
20
|
+
//region block: imports
|
|
21
|
+
var protoOf = kotlin_kotlin.$_$.fd;
|
|
22
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.jc;
|
|
23
|
+
var Companion_instance = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.k;
|
|
24
|
+
var CONTEXTUAL_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h;
|
|
25
|
+
var buildSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m1;
|
|
26
|
+
var Unit_instance = kotlin_kotlin.$_$.p5;
|
|
27
|
+
var OPEN_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e;
|
|
28
|
+
var ObjectIdentifier = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.c;
|
|
29
|
+
var THROW_CCE = kotlin_kotlin.$_$.di;
|
|
30
|
+
var isInterface = kotlin_kotlin.$_$.uc;
|
|
31
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.u1;
|
|
32
|
+
var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o2;
|
|
33
|
+
var initMetadataForClass = kotlin_kotlin.$_$.fc;
|
|
34
|
+
var VOID = kotlin_kotlin.$_$.c;
|
|
35
|
+
var _ObjectIdentifier___init__impl__7hutfr = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.e;
|
|
36
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.gc;
|
|
37
|
+
var InlineClassDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y1;
|
|
38
|
+
var $serializer_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.j;
|
|
39
|
+
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w1;
|
|
40
|
+
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x1;
|
|
41
|
+
var initMetadataForObject = kotlin_kotlin.$_$.lc;
|
|
42
|
+
var ObjectIdentifier__toString_impl_dtwsrd = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.g;
|
|
43
|
+
var ObjectIdentifier__hashCode_impl_7x941i = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.f;
|
|
44
|
+
var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;
|
|
45
|
+
var TagType_EXPLICIT_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.d;
|
|
46
|
+
var ContextSpecificTag = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.b;
|
|
47
|
+
var ByteArraySerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o;
|
|
48
|
+
var $serializer_getInstance_0 = kotlin_dev_whyoleg_cryptography_cryptography_serialization_asn1.$_$.h;
|
|
49
|
+
var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d;
|
|
50
|
+
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p;
|
|
51
|
+
var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;
|
|
52
|
+
var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
|
|
53
|
+
var objectCreate = kotlin_kotlin.$_$.ed;
|
|
54
|
+
var NothingSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
|
|
55
|
+
var getKClass = kotlin_kotlin.$_$.zd;
|
|
56
|
+
var ContextualSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.m2;
|
|
57
|
+
var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.f;
|
|
58
|
+
var lazy = kotlin_kotlin.$_$.bj;
|
|
59
|
+
//endregion
|
|
10
60
|
//region block: pre-declaration
|
|
61
|
+
initMetadataForInterface(AlgorithmIdentifier, 'AlgorithmIdentifier');
|
|
62
|
+
initMetadataForClass(AlgorithmIdentifierSerializer, 'AlgorithmIdentifierSerializer', VOID, VOID, [KSerializer]);
|
|
63
|
+
initMetadataForInterface(KeyAlgorithmIdentifier, 'KeyAlgorithmIdentifier', VOID, VOID, [AlgorithmIdentifier], VOID, VOID, {0: KeyAlgorithmIdentifierSerializer_getInstance});
|
|
64
|
+
initMetadataForClass(EcKeyAlgorithmIdentifier, 'EcKeyAlgorithmIdentifier', VOID, VOID, [KeyAlgorithmIdentifier]);
|
|
65
|
+
initMetadataForCompanion(Companion);
|
|
66
|
+
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
67
|
+
initMetadataForClass(EcParameters, 'EcParameters', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_1});
|
|
68
|
+
initMetadataForCompanion(Companion_0);
|
|
69
|
+
initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
70
|
+
initMetadataForClass(EcPrivateKey, 'EcPrivateKey', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_2});
|
|
71
|
+
initMetadataForClass(UnknownKeyAlgorithmIdentifier, 'UnknownKeyAlgorithmIdentifier', VOID, VOID, [KeyAlgorithmIdentifier]);
|
|
72
|
+
initMetadataForObject(KeyAlgorithmIdentifierSerializer, 'KeyAlgorithmIdentifierSerializer', VOID, AlgorithmIdentifierSerializer);
|
|
73
|
+
initMetadataForCompanion(Companion_1);
|
|
74
|
+
initMetadataForObject($serializer_1, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
75
|
+
initMetadataForClass(PrivateKeyInfo, 'PrivateKeyInfo', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_3});
|
|
76
|
+
initMetadataForCompanion(Companion_2);
|
|
77
|
+
initMetadataForObject($serializer_2, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
78
|
+
initMetadataForClass(SubjectPublicKeyInfo, 'SubjectPublicKeyInfo', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_4});
|
|
79
|
+
initMetadataForObject(RsaKeyAlgorithmIdentifier, 'RsaKeyAlgorithmIdentifier', VOID, VOID, [KeyAlgorithmIdentifier]);
|
|
80
|
+
//endregion
|
|
81
|
+
function AlgorithmIdentifier() {
|
|
82
|
+
}
|
|
83
|
+
function AlgorithmIdentifierSerializer$descriptor$lambda($this$buildSerialDescriptor) {
|
|
84
|
+
$this$buildSerialDescriptor.o1z('algorithm', Companion_instance.q67().v1y());
|
|
85
|
+
$this$buildSerialDescriptor.o1z('parameters', buildSerialDescriptor('Any', CONTEXTUAL_getInstance(), []));
|
|
86
|
+
return Unit_instance;
|
|
87
|
+
}
|
|
88
|
+
function AlgorithmIdentifierSerializer() {
|
|
89
|
+
var tmp = this;
|
|
90
|
+
var tmp_0 = OPEN_getInstance();
|
|
91
|
+
tmp.k7v_1 = buildSerialDescriptor('AlgorithmIdentifier', tmp_0, [], AlgorithmIdentifierSerializer$descriptor$lambda);
|
|
92
|
+
}
|
|
93
|
+
protoOf(AlgorithmIdentifierSerializer).n7v = function (_this__u8e3s4, serializer, value) {
|
|
94
|
+
_this__u8e3s4.b24(this.k7v_1, 1, serializer, value);
|
|
95
|
+
};
|
|
96
|
+
protoOf(AlgorithmIdentifierSerializer).o7v = function (_this__u8e3s4, serializer) {
|
|
97
|
+
return _this__u8e3s4.y22(this.k7v_1, 1, serializer);
|
|
98
|
+
};
|
|
99
|
+
protoOf(AlgorithmIdentifierSerializer).v1y = function () {
|
|
100
|
+
return this.k7v_1;
|
|
101
|
+
};
|
|
102
|
+
protoOf(AlgorithmIdentifierSerializer).p7v = function (encoder, value) {
|
|
103
|
+
// Inline function 'kotlinx.serialization.encoding.encodeStructure' call
|
|
104
|
+
var descriptor = this.k7v_1;
|
|
105
|
+
var composite = encoder.j22(descriptor);
|
|
106
|
+
composite.a24(this.k7v_1, 0, Companion_instance.q67(), new ObjectIdentifier(value.j7v()));
|
|
107
|
+
this.l7v(composite, value);
|
|
108
|
+
composite.k22(descriptor);
|
|
109
|
+
return Unit_instance;
|
|
110
|
+
};
|
|
111
|
+
protoOf(AlgorithmIdentifierSerializer).i1z = function (encoder, value) {
|
|
112
|
+
return this.p7v(encoder, (!(value == null) ? isInterface(value, AlgorithmIdentifier) : false) ? value : THROW_CCE());
|
|
113
|
+
};
|
|
114
|
+
protoOf(AlgorithmIdentifierSerializer).j1z = function (decoder) {
|
|
115
|
+
// Inline function 'kotlinx.serialization.encoding.decodeStructure' call
|
|
116
|
+
var descriptor = this.k7v_1;
|
|
117
|
+
var composite = decoder.j22(descriptor);
|
|
118
|
+
// Inline function 'kotlin.check' call
|
|
119
|
+
if (!(composite.a23(this.k7v_1) === 0)) {
|
|
120
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
121
|
+
}
|
|
122
|
+
var algorithm = composite.w22(this.k7v_1, 0, Companion_instance.q67()).f7u_1;
|
|
123
|
+
// Inline function 'kotlin.check' call
|
|
124
|
+
if (!(composite.a23(this.k7v_1) === 1)) {
|
|
125
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
126
|
+
}
|
|
127
|
+
var parameters = this.m7v(composite, algorithm);
|
|
128
|
+
// Inline function 'kotlin.check' call
|
|
129
|
+
if (!(composite.a23(this.k7v_1) === -1)) {
|
|
130
|
+
throw IllegalStateException_init_$Create$('Check failed.');
|
|
131
|
+
}
|
|
132
|
+
var result = parameters;
|
|
133
|
+
composite.k22(descriptor);
|
|
134
|
+
return result;
|
|
135
|
+
};
|
|
136
|
+
function get_secp256r1(_this__u8e3s4) {
|
|
137
|
+
return _ObjectIdentifier___init__impl__7hutfr('1.2.840.10045.3.1.7');
|
|
138
|
+
}
|
|
139
|
+
function get_secp384r1(_this__u8e3s4) {
|
|
140
|
+
return _ObjectIdentifier___init__impl__7hutfr('1.3.132.0.34');
|
|
141
|
+
}
|
|
142
|
+
function get_secp521r1(_this__u8e3s4) {
|
|
143
|
+
return _ObjectIdentifier___init__impl__7hutfr('1.3.132.0.35');
|
|
144
|
+
}
|
|
145
|
+
function EcKeyAlgorithmIdentifier(parameters) {
|
|
146
|
+
this.q7v_1 = parameters;
|
|
147
|
+
}
|
|
148
|
+
protoOf(EcKeyAlgorithmIdentifier).j7v = function () {
|
|
149
|
+
return get_EC(Companion_instance);
|
|
150
|
+
};
|
|
151
|
+
function _EcParameters___init__impl__i4ww9z(namedCurve) {
|
|
152
|
+
return namedCurve;
|
|
153
|
+
}
|
|
154
|
+
function _EcParameters___get_namedCurve__impl__oibidm($this) {
|
|
155
|
+
return $this;
|
|
156
|
+
}
|
|
157
|
+
function Companion() {
|
|
158
|
+
}
|
|
159
|
+
protoOf(Companion).q67 = function () {
|
|
160
|
+
return $serializer_getInstance_1();
|
|
161
|
+
};
|
|
162
|
+
var Companion_instance_0;
|
|
163
|
+
function Companion_getInstance() {
|
|
164
|
+
return Companion_instance_0;
|
|
165
|
+
}
|
|
166
|
+
function $serializer() {
|
|
167
|
+
$serializer_instance = this;
|
|
168
|
+
var tmp0_serialDesc = new InlineClassDescriptor('dev.whyoleg.cryptography.serialization.asn1.modules.EcParameters', this);
|
|
169
|
+
tmp0_serialDesc.y29('namedCurve', false);
|
|
170
|
+
this.r7v_1 = tmp0_serialDesc;
|
|
171
|
+
}
|
|
172
|
+
protoOf($serializer).s7v = function (encoder, value) {
|
|
173
|
+
var tmp0_inlineEncoder = encoder.p23(this.r7v_1);
|
|
174
|
+
if (tmp0_inlineEncoder == null)
|
|
175
|
+
null;
|
|
176
|
+
else {
|
|
177
|
+
tmp0_inlineEncoder.h1z($serializer_getInstance(), new ObjectIdentifier(_EcParameters___get_namedCurve__impl__oibidm(value)));
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
protoOf($serializer).i1z = function (encoder, value) {
|
|
181
|
+
return this.s7v(encoder, value instanceof EcParameters ? value.t7v_1 : THROW_CCE());
|
|
182
|
+
};
|
|
183
|
+
protoOf($serializer).u7v = function (decoder) {
|
|
184
|
+
return _EcParameters___init__impl__i4ww9z(decoder.h22(this.r7v_1).k1z($serializer_getInstance()).f7u_1);
|
|
185
|
+
};
|
|
186
|
+
protoOf($serializer).j1z = function (decoder) {
|
|
187
|
+
return new EcParameters(this.u7v(decoder));
|
|
188
|
+
};
|
|
189
|
+
protoOf($serializer).v1y = function () {
|
|
190
|
+
return this.r7v_1;
|
|
191
|
+
};
|
|
192
|
+
protoOf($serializer).p2a = function () {
|
|
193
|
+
// Inline function 'kotlin.arrayOf' call
|
|
194
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
195
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
196
|
+
return [$serializer_getInstance()];
|
|
197
|
+
};
|
|
198
|
+
var $serializer_instance;
|
|
199
|
+
function $serializer_getInstance_1() {
|
|
200
|
+
if ($serializer_instance == null)
|
|
201
|
+
new $serializer();
|
|
202
|
+
return $serializer_instance;
|
|
203
|
+
}
|
|
204
|
+
function EcParameters__toString_impl_mgxjuh($this) {
|
|
205
|
+
return 'EcParameters(namedCurve=' + ObjectIdentifier__toString_impl_dtwsrd($this) + ')';
|
|
206
|
+
}
|
|
207
|
+
function EcParameters__hashCode_impl_prn1m($this) {
|
|
208
|
+
return ObjectIdentifier__hashCode_impl_7x941i($this);
|
|
209
|
+
}
|
|
210
|
+
function EcParameters__equals_impl_5tm4e2($this, other) {
|
|
211
|
+
if (!(other instanceof EcParameters))
|
|
212
|
+
return false;
|
|
213
|
+
if (!($this === (other instanceof EcParameters ? other.t7v_1 : THROW_CCE())))
|
|
214
|
+
return false;
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
function EcParameters(namedCurve) {
|
|
218
|
+
this.t7v_1 = namedCurve;
|
|
219
|
+
}
|
|
220
|
+
protoOf(EcParameters).toString = function () {
|
|
221
|
+
return EcParameters__toString_impl_mgxjuh(this.t7v_1);
|
|
222
|
+
};
|
|
223
|
+
protoOf(EcParameters).hashCode = function () {
|
|
224
|
+
return EcParameters__hashCode_impl_prn1m(this.t7v_1);
|
|
225
|
+
};
|
|
226
|
+
protoOf(EcParameters).equals = function (other) {
|
|
227
|
+
return EcParameters__equals_impl_5tm4e2(this.t7v_1, other);
|
|
228
|
+
};
|
|
229
|
+
function Companion_0() {
|
|
230
|
+
}
|
|
231
|
+
protoOf(Companion_0).q67 = function () {
|
|
232
|
+
return $serializer_getInstance_2();
|
|
233
|
+
};
|
|
234
|
+
var Companion_instance_1;
|
|
235
|
+
function Companion_getInstance_0() {
|
|
236
|
+
return Companion_instance_1;
|
|
237
|
+
}
|
|
238
|
+
function $serializer_0() {
|
|
239
|
+
$serializer_instance_0 = this;
|
|
240
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('dev.whyoleg.cryptography.serialization.asn1.modules.EcPrivateKey', this, 4);
|
|
241
|
+
tmp0_serialDesc.y29('version', false);
|
|
242
|
+
tmp0_serialDesc.y29('privateKey', false);
|
|
243
|
+
tmp0_serialDesc.y29('parameters', true);
|
|
244
|
+
tmp0_serialDesc.z29(new ContextSpecificTag(0, TagType_EXPLICIT_getInstance()));
|
|
245
|
+
tmp0_serialDesc.y29('publicKey', true);
|
|
246
|
+
tmp0_serialDesc.z29(new ContextSpecificTag(1, TagType_EXPLICIT_getInstance()));
|
|
247
|
+
this.v7v_1 = tmp0_serialDesc;
|
|
248
|
+
}
|
|
249
|
+
protoOf($serializer_0).w7v = function (encoder, value) {
|
|
250
|
+
var tmp0_desc = this.v7v_1;
|
|
251
|
+
var tmp1_output = encoder.j22(tmp0_desc);
|
|
252
|
+
tmp1_output.t23(tmp0_desc, 0, value.x7v_1);
|
|
253
|
+
tmp1_output.a24(tmp0_desc, 1, ByteArraySerializer_getInstance(), value.y7v_1);
|
|
254
|
+
var tmp;
|
|
255
|
+
if (tmp1_output.f24(tmp0_desc, 2)) {
|
|
256
|
+
tmp = true;
|
|
257
|
+
} else {
|
|
258
|
+
var tmp_0 = value.z7v_1;
|
|
259
|
+
tmp = !((tmp_0 == null ? null : new EcParameters(tmp_0)) == null);
|
|
260
|
+
}
|
|
261
|
+
if (tmp) {
|
|
262
|
+
var tmp_1 = $serializer_getInstance_1();
|
|
263
|
+
var tmp_2 = value.z7v_1;
|
|
264
|
+
tmp1_output.b24(tmp0_desc, 2, tmp_1, tmp_2 == null ? null : new EcParameters(tmp_2));
|
|
265
|
+
}
|
|
266
|
+
if (tmp1_output.f24(tmp0_desc, 3) ? true : !(value.a7w_1 == null)) {
|
|
267
|
+
tmp1_output.b24(tmp0_desc, 3, $serializer_getInstance_0(), value.a7w_1);
|
|
268
|
+
}
|
|
269
|
+
tmp1_output.k22(tmp0_desc);
|
|
270
|
+
};
|
|
271
|
+
protoOf($serializer_0).i1z = function (encoder, value) {
|
|
272
|
+
return this.w7v(encoder, value instanceof EcPrivateKey ? value : THROW_CCE());
|
|
273
|
+
};
|
|
274
|
+
protoOf($serializer_0).j1z = function (decoder) {
|
|
275
|
+
var tmp0_desc = this.v7v_1;
|
|
276
|
+
var tmp1_flag = true;
|
|
277
|
+
var tmp2_index = 0;
|
|
278
|
+
var tmp3_bitMask0 = 0;
|
|
279
|
+
var tmp4_local0 = 0;
|
|
280
|
+
var tmp5_local1 = null;
|
|
281
|
+
var tmp6_local2 = null;
|
|
282
|
+
var tmp7_local3 = null;
|
|
283
|
+
var tmp8_input = decoder.j22(tmp0_desc);
|
|
284
|
+
if (tmp8_input.z22()) {
|
|
285
|
+
tmp4_local0 = tmp8_input.o22(tmp0_desc, 0);
|
|
286
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
287
|
+
tmp5_local1 = tmp8_input.v22(tmp0_desc, 1, ByteArraySerializer_getInstance(), tmp5_local1);
|
|
288
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
289
|
+
var tmp = $serializer_getInstance_1();
|
|
290
|
+
var tmp_0 = tmp6_local2;
|
|
291
|
+
var tmp_1 = tmp8_input.x22(tmp0_desc, 2, tmp, tmp_0 == null ? null : new EcParameters(tmp_0));
|
|
292
|
+
tmp6_local2 = tmp_1 == null ? null : tmp_1.t7v_1;
|
|
293
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
294
|
+
tmp7_local3 = tmp8_input.x22(tmp0_desc, 3, $serializer_getInstance_0(), tmp7_local3);
|
|
295
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
296
|
+
} else
|
|
297
|
+
while (tmp1_flag) {
|
|
298
|
+
tmp2_index = tmp8_input.a23(tmp0_desc);
|
|
299
|
+
switch (tmp2_index) {
|
|
300
|
+
case -1:
|
|
301
|
+
tmp1_flag = false;
|
|
302
|
+
break;
|
|
303
|
+
case 0:
|
|
304
|
+
tmp4_local0 = tmp8_input.o22(tmp0_desc, 0);
|
|
305
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
306
|
+
break;
|
|
307
|
+
case 1:
|
|
308
|
+
tmp5_local1 = tmp8_input.v22(tmp0_desc, 1, ByteArraySerializer_getInstance(), tmp5_local1);
|
|
309
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
310
|
+
break;
|
|
311
|
+
case 2:
|
|
312
|
+
var tmp_2 = $serializer_getInstance_1();
|
|
313
|
+
var tmp_3 = tmp6_local2;
|
|
314
|
+
var tmp_4 = tmp8_input.x22(tmp0_desc, 2, tmp_2, tmp_3 == null ? null : new EcParameters(tmp_3));
|
|
315
|
+
tmp6_local2 = tmp_4 == null ? null : tmp_4.t7v_1;
|
|
316
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
317
|
+
break;
|
|
318
|
+
case 3:
|
|
319
|
+
tmp7_local3 = tmp8_input.x22(tmp0_desc, 3, $serializer_getInstance_0(), tmp7_local3);
|
|
320
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 8;
|
|
321
|
+
break;
|
|
322
|
+
default:
|
|
323
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
tmp8_input.k22(tmp0_desc);
|
|
327
|
+
return EcPrivateKey_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
|
|
328
|
+
};
|
|
329
|
+
protoOf($serializer_0).v1y = function () {
|
|
330
|
+
return this.v7v_1;
|
|
331
|
+
};
|
|
332
|
+
protoOf($serializer_0).p2a = function () {
|
|
333
|
+
// Inline function 'kotlin.arrayOf' call
|
|
334
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
335
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
336
|
+
return [IntSerializer_getInstance(), ByteArraySerializer_getInstance(), get_nullable($serializer_getInstance_1()), get_nullable($serializer_getInstance_0())];
|
|
337
|
+
};
|
|
338
|
+
var $serializer_instance_0;
|
|
339
|
+
function $serializer_getInstance_2() {
|
|
340
|
+
if ($serializer_instance_0 == null)
|
|
341
|
+
new $serializer_0();
|
|
342
|
+
return $serializer_instance_0;
|
|
343
|
+
}
|
|
344
|
+
function EcPrivateKey_init_$Init$(seen0, version, privateKey, parameters, publicKey, serializationConstructorMarker, $this) {
|
|
345
|
+
if (!(3 === (3 & seen0))) {
|
|
346
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_2().v7v_1);
|
|
347
|
+
}
|
|
348
|
+
$this.x7v_1 = version;
|
|
349
|
+
$this.y7v_1 = privateKey;
|
|
350
|
+
if (0 === (seen0 & 4))
|
|
351
|
+
$this.z7v_1 = null;
|
|
352
|
+
else
|
|
353
|
+
$this.z7v_1 = parameters;
|
|
354
|
+
if (0 === (seen0 & 8))
|
|
355
|
+
$this.a7w_1 = null;
|
|
356
|
+
else
|
|
357
|
+
$this.a7w_1 = publicKey;
|
|
358
|
+
return $this;
|
|
359
|
+
}
|
|
360
|
+
function EcPrivateKey_init_$Create$(seen0, version, privateKey, parameters, publicKey, serializationConstructorMarker) {
|
|
361
|
+
return EcPrivateKey_init_$Init$(seen0, version, privateKey, parameters, publicKey, serializationConstructorMarker, objectCreate(protoOf(EcPrivateKey)));
|
|
362
|
+
}
|
|
363
|
+
function EcPrivateKey(version, privateKey, parameters, publicKey) {
|
|
364
|
+
parameters = parameters === VOID ? null : parameters;
|
|
365
|
+
publicKey = publicKey === VOID ? null : publicKey;
|
|
366
|
+
this.x7v_1 = version;
|
|
367
|
+
this.y7v_1 = privateKey;
|
|
368
|
+
this.z7v_1 = parameters;
|
|
369
|
+
this.a7w_1 = publicKey;
|
|
370
|
+
}
|
|
371
|
+
function get_EC(_this__u8e3s4) {
|
|
372
|
+
return _ObjectIdentifier___init__impl__7hutfr('1.2.840.10045.2.1');
|
|
373
|
+
}
|
|
374
|
+
function KeyAlgorithmIdentifier() {
|
|
375
|
+
}
|
|
376
|
+
function UnknownKeyAlgorithmIdentifier(algorithm) {
|
|
377
|
+
this.b7w_1 = algorithm;
|
|
378
|
+
}
|
|
379
|
+
protoOf(UnknownKeyAlgorithmIdentifier).j7v = function () {
|
|
380
|
+
return this.b7w_1;
|
|
381
|
+
};
|
|
382
|
+
protoOf(UnknownKeyAlgorithmIdentifier).c7w = function () {
|
|
383
|
+
return null;
|
|
384
|
+
};
|
|
385
|
+
function KeyAlgorithmIdentifierSerializer() {
|
|
386
|
+
KeyAlgorithmIdentifierSerializer_instance = this;
|
|
387
|
+
AlgorithmIdentifierSerializer.call(this);
|
|
388
|
+
}
|
|
389
|
+
protoOf(KeyAlgorithmIdentifierSerializer).e7w = function (_this__u8e3s4, value) {
|
|
390
|
+
var tmp;
|
|
391
|
+
if (value instanceof RsaKeyAlgorithmIdentifier) {
|
|
392
|
+
this.n7v(_this__u8e3s4, NothingSerializer(), RsaKeyAlgorithmIdentifier_instance.c7w());
|
|
393
|
+
tmp = Unit_instance;
|
|
394
|
+
} else {
|
|
395
|
+
if (value instanceof EcKeyAlgorithmIdentifier) {
|
|
396
|
+
var tmp_0 = Companion_instance_0.q67();
|
|
397
|
+
var tmp_1 = value.q7v_1;
|
|
398
|
+
this.n7v(_this__u8e3s4, tmp_0, tmp_1 == null ? null : new EcParameters(tmp_1));
|
|
399
|
+
tmp = Unit_instance;
|
|
400
|
+
} else {
|
|
401
|
+
if (value instanceof UnknownKeyAlgorithmIdentifier) {
|
|
402
|
+
this.n7v(_this__u8e3s4, NothingSerializer(), value.c7w());
|
|
403
|
+
tmp = Unit_instance;
|
|
404
|
+
} else {
|
|
405
|
+
this.n7v(_this__u8e3s4, NothingSerializer(), null);
|
|
406
|
+
tmp = Unit_instance;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return tmp;
|
|
411
|
+
};
|
|
412
|
+
protoOf(KeyAlgorithmIdentifierSerializer).l7v = function (_this__u8e3s4, value) {
|
|
413
|
+
return this.e7w(_this__u8e3s4, isInterface(value, KeyAlgorithmIdentifier) ? value : THROW_CCE());
|
|
414
|
+
};
|
|
415
|
+
protoOf(KeyAlgorithmIdentifierSerializer).m7v = function (_this__u8e3s4, algorithm) {
|
|
416
|
+
var tmp;
|
|
417
|
+
if (algorithm === get_RSA(Companion_instance)) {
|
|
418
|
+
this.o7v(_this__u8e3s4, NothingSerializer());
|
|
419
|
+
tmp = RsaKeyAlgorithmIdentifier_instance;
|
|
420
|
+
} else if (algorithm === get_EC(Companion_instance)) {
|
|
421
|
+
var tmp_0 = this.o7v(_this__u8e3s4, Companion_instance_0.q67());
|
|
422
|
+
tmp = new EcKeyAlgorithmIdentifier(tmp_0 == null ? null : tmp_0.t7v_1);
|
|
423
|
+
} else {
|
|
424
|
+
tmp = new UnknownKeyAlgorithmIdentifier(algorithm);
|
|
425
|
+
}
|
|
426
|
+
return tmp;
|
|
427
|
+
};
|
|
428
|
+
var KeyAlgorithmIdentifierSerializer_instance;
|
|
429
|
+
function KeyAlgorithmIdentifierSerializer_getInstance() {
|
|
430
|
+
if (KeyAlgorithmIdentifierSerializer_instance == null)
|
|
431
|
+
new KeyAlgorithmIdentifierSerializer();
|
|
432
|
+
return KeyAlgorithmIdentifierSerializer_instance;
|
|
433
|
+
}
|
|
434
|
+
function PrivateKeyInfo$Companion$$childSerializers$_anonymous__z2jngg() {
|
|
435
|
+
var tmp = getKClass(KeyAlgorithmIdentifier);
|
|
436
|
+
var tmp_0 = KeyAlgorithmIdentifierSerializer_getInstance();
|
|
437
|
+
// Inline function 'kotlin.arrayOf' call
|
|
438
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
439
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
440
|
+
var tmp$ret$2 = [];
|
|
441
|
+
return new ContextualSerializer(tmp, tmp_0, tmp$ret$2);
|
|
442
|
+
}
|
|
443
|
+
function Companion_1() {
|
|
444
|
+
Companion_instance_2 = this;
|
|
445
|
+
var tmp = this;
|
|
446
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
447
|
+
// Inline function 'kotlin.arrayOf' call
|
|
448
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
449
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
450
|
+
tmp.f7w_1 = [null, lazy(tmp_0, PrivateKeyInfo$Companion$$childSerializers$_anonymous__z2jngg), null];
|
|
451
|
+
}
|
|
452
|
+
protoOf(Companion_1).q67 = function () {
|
|
453
|
+
return $serializer_getInstance_3();
|
|
454
|
+
};
|
|
455
|
+
var Companion_instance_2;
|
|
456
|
+
function Companion_getInstance_1() {
|
|
457
|
+
if (Companion_instance_2 == null)
|
|
458
|
+
new Companion_1();
|
|
459
|
+
return Companion_instance_2;
|
|
460
|
+
}
|
|
461
|
+
function $serializer_1() {
|
|
462
|
+
$serializer_instance_1 = this;
|
|
463
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('dev.whyoleg.cryptography.serialization.asn1.modules.PrivateKeyInfo', this, 3);
|
|
464
|
+
tmp0_serialDesc.y29('version', false);
|
|
465
|
+
tmp0_serialDesc.y29('privateKeyAlgorithm', false);
|
|
466
|
+
tmp0_serialDesc.y29('privateKey', false);
|
|
467
|
+
this.g7w_1 = tmp0_serialDesc;
|
|
468
|
+
}
|
|
469
|
+
protoOf($serializer_1).h7w = function (encoder, value) {
|
|
470
|
+
var tmp0_desc = this.g7w_1;
|
|
471
|
+
var tmp1_output = encoder.j22(tmp0_desc);
|
|
472
|
+
var tmp2_cached = Companion_getInstance_1().f7w_1;
|
|
473
|
+
tmp1_output.t23(tmp0_desc, 0, value.i7w_1);
|
|
474
|
+
tmp1_output.a24(tmp0_desc, 1, tmp2_cached[1].n1(), value.j7w_1);
|
|
475
|
+
tmp1_output.a24(tmp0_desc, 2, ByteArraySerializer_getInstance(), value.k7w_1);
|
|
476
|
+
tmp1_output.k22(tmp0_desc);
|
|
477
|
+
};
|
|
478
|
+
protoOf($serializer_1).i1z = function (encoder, value) {
|
|
479
|
+
return this.h7w(encoder, value instanceof PrivateKeyInfo ? value : THROW_CCE());
|
|
480
|
+
};
|
|
481
|
+
protoOf($serializer_1).j1z = function (decoder) {
|
|
482
|
+
var tmp0_desc = this.g7w_1;
|
|
483
|
+
var tmp1_flag = true;
|
|
484
|
+
var tmp2_index = 0;
|
|
485
|
+
var tmp3_bitMask0 = 0;
|
|
486
|
+
var tmp4_local0 = 0;
|
|
487
|
+
var tmp5_local1 = null;
|
|
488
|
+
var tmp6_local2 = null;
|
|
489
|
+
var tmp7_input = decoder.j22(tmp0_desc);
|
|
490
|
+
var tmp8_cached = Companion_getInstance_1().f7w_1;
|
|
491
|
+
if (tmp7_input.z22()) {
|
|
492
|
+
tmp4_local0 = tmp7_input.o22(tmp0_desc, 0);
|
|
493
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
494
|
+
tmp5_local1 = tmp7_input.v22(tmp0_desc, 1, tmp8_cached[1].n1(), tmp5_local1);
|
|
495
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
496
|
+
tmp6_local2 = tmp7_input.v22(tmp0_desc, 2, ByteArraySerializer_getInstance(), tmp6_local2);
|
|
497
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
498
|
+
} else
|
|
499
|
+
while (tmp1_flag) {
|
|
500
|
+
tmp2_index = tmp7_input.a23(tmp0_desc);
|
|
501
|
+
switch (tmp2_index) {
|
|
502
|
+
case -1:
|
|
503
|
+
tmp1_flag = false;
|
|
504
|
+
break;
|
|
505
|
+
case 0:
|
|
506
|
+
tmp4_local0 = tmp7_input.o22(tmp0_desc, 0);
|
|
507
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
508
|
+
break;
|
|
509
|
+
case 1:
|
|
510
|
+
tmp5_local1 = tmp7_input.v22(tmp0_desc, 1, tmp8_cached[1].n1(), tmp5_local1);
|
|
511
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
512
|
+
break;
|
|
513
|
+
case 2:
|
|
514
|
+
tmp6_local2 = tmp7_input.v22(tmp0_desc, 2, ByteArraySerializer_getInstance(), tmp6_local2);
|
|
515
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 4;
|
|
516
|
+
break;
|
|
517
|
+
default:
|
|
518
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
tmp7_input.k22(tmp0_desc);
|
|
522
|
+
return PrivateKeyInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
|
|
523
|
+
};
|
|
524
|
+
protoOf($serializer_1).v1y = function () {
|
|
525
|
+
return this.g7w_1;
|
|
526
|
+
};
|
|
527
|
+
protoOf($serializer_1).p2a = function () {
|
|
528
|
+
var tmp0_cached = Companion_getInstance_1().f7w_1;
|
|
529
|
+
// Inline function 'kotlin.arrayOf' call
|
|
530
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
531
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
532
|
+
return [IntSerializer_getInstance(), tmp0_cached[1].n1(), ByteArraySerializer_getInstance()];
|
|
533
|
+
};
|
|
534
|
+
var $serializer_instance_1;
|
|
535
|
+
function $serializer_getInstance_3() {
|
|
536
|
+
if ($serializer_instance_1 == null)
|
|
537
|
+
new $serializer_1();
|
|
538
|
+
return $serializer_instance_1;
|
|
539
|
+
}
|
|
540
|
+
function PrivateKeyInfo_init_$Init$(seen0, version, privateKeyAlgorithm, privateKey, serializationConstructorMarker, $this) {
|
|
541
|
+
if (!(7 === (7 & seen0))) {
|
|
542
|
+
throwMissingFieldException(seen0, 7, $serializer_getInstance_3().g7w_1);
|
|
543
|
+
}
|
|
544
|
+
$this.i7w_1 = version;
|
|
545
|
+
$this.j7w_1 = privateKeyAlgorithm;
|
|
546
|
+
$this.k7w_1 = privateKey;
|
|
547
|
+
return $this;
|
|
548
|
+
}
|
|
549
|
+
function PrivateKeyInfo_init_$Create$(seen0, version, privateKeyAlgorithm, privateKey, serializationConstructorMarker) {
|
|
550
|
+
return PrivateKeyInfo_init_$Init$(seen0, version, privateKeyAlgorithm, privateKey, serializationConstructorMarker, objectCreate(protoOf(PrivateKeyInfo)));
|
|
551
|
+
}
|
|
552
|
+
function PrivateKeyInfo(version, privateKeyAlgorithm, privateKey) {
|
|
553
|
+
Companion_getInstance_1();
|
|
554
|
+
this.i7w_1 = version;
|
|
555
|
+
this.j7w_1 = privateKeyAlgorithm;
|
|
556
|
+
this.k7w_1 = privateKey;
|
|
557
|
+
}
|
|
558
|
+
function SubjectPublicKeyInfo$Companion$$childSerializers$_anonymous__ezpjw2() {
|
|
559
|
+
var tmp = getKClass(KeyAlgorithmIdentifier);
|
|
560
|
+
var tmp_0 = KeyAlgorithmIdentifierSerializer_getInstance();
|
|
561
|
+
// Inline function 'kotlin.arrayOf' call
|
|
562
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
563
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
564
|
+
var tmp$ret$2 = [];
|
|
565
|
+
return new ContextualSerializer(tmp, tmp_0, tmp$ret$2);
|
|
566
|
+
}
|
|
567
|
+
function Companion_2() {
|
|
568
|
+
Companion_instance_3 = this;
|
|
569
|
+
var tmp = this;
|
|
570
|
+
var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
|
|
571
|
+
// Inline function 'kotlin.arrayOf' call
|
|
572
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
573
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
574
|
+
tmp.l7w_1 = [lazy(tmp_0, SubjectPublicKeyInfo$Companion$$childSerializers$_anonymous__ezpjw2), null];
|
|
575
|
+
}
|
|
576
|
+
protoOf(Companion_2).q67 = function () {
|
|
577
|
+
return $serializer_getInstance_4();
|
|
578
|
+
};
|
|
579
|
+
var Companion_instance_3;
|
|
580
|
+
function Companion_getInstance_2() {
|
|
581
|
+
if (Companion_instance_3 == null)
|
|
582
|
+
new Companion_2();
|
|
583
|
+
return Companion_instance_3;
|
|
584
|
+
}
|
|
585
|
+
function $serializer_2() {
|
|
586
|
+
$serializer_instance_2 = this;
|
|
587
|
+
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('dev.whyoleg.cryptography.serialization.asn1.modules.SubjectPublicKeyInfo', this, 2);
|
|
588
|
+
tmp0_serialDesc.y29('algorithm', false);
|
|
589
|
+
tmp0_serialDesc.y29('subjectPublicKey', false);
|
|
590
|
+
this.m7w_1 = tmp0_serialDesc;
|
|
591
|
+
}
|
|
592
|
+
protoOf($serializer_2).n7w = function (encoder, value) {
|
|
593
|
+
var tmp0_desc = this.m7w_1;
|
|
594
|
+
var tmp1_output = encoder.j22(tmp0_desc);
|
|
595
|
+
var tmp2_cached = Companion_getInstance_2().l7w_1;
|
|
596
|
+
tmp1_output.a24(tmp0_desc, 0, tmp2_cached[0].n1(), value.o7w_1);
|
|
597
|
+
tmp1_output.a24(tmp0_desc, 1, $serializer_getInstance_0(), value.p7w_1);
|
|
598
|
+
tmp1_output.k22(tmp0_desc);
|
|
599
|
+
};
|
|
600
|
+
protoOf($serializer_2).i1z = function (encoder, value) {
|
|
601
|
+
return this.n7w(encoder, value instanceof SubjectPublicKeyInfo ? value : THROW_CCE());
|
|
602
|
+
};
|
|
603
|
+
protoOf($serializer_2).j1z = function (decoder) {
|
|
604
|
+
var tmp0_desc = this.m7w_1;
|
|
605
|
+
var tmp1_flag = true;
|
|
606
|
+
var tmp2_index = 0;
|
|
607
|
+
var tmp3_bitMask0 = 0;
|
|
608
|
+
var tmp4_local0 = null;
|
|
609
|
+
var tmp5_local1 = null;
|
|
610
|
+
var tmp6_input = decoder.j22(tmp0_desc);
|
|
611
|
+
var tmp7_cached = Companion_getInstance_2().l7w_1;
|
|
612
|
+
if (tmp6_input.z22()) {
|
|
613
|
+
tmp4_local0 = tmp6_input.v22(tmp0_desc, 0, tmp7_cached[0].n1(), tmp4_local0);
|
|
614
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
615
|
+
tmp5_local1 = tmp6_input.v22(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);
|
|
616
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
617
|
+
} else
|
|
618
|
+
while (tmp1_flag) {
|
|
619
|
+
tmp2_index = tmp6_input.a23(tmp0_desc);
|
|
620
|
+
switch (tmp2_index) {
|
|
621
|
+
case -1:
|
|
622
|
+
tmp1_flag = false;
|
|
623
|
+
break;
|
|
624
|
+
case 0:
|
|
625
|
+
tmp4_local0 = tmp6_input.v22(tmp0_desc, 0, tmp7_cached[0].n1(), tmp4_local0);
|
|
626
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 1;
|
|
627
|
+
break;
|
|
628
|
+
case 1:
|
|
629
|
+
tmp5_local1 = tmp6_input.v22(tmp0_desc, 1, $serializer_getInstance_0(), tmp5_local1);
|
|
630
|
+
tmp3_bitMask0 = tmp3_bitMask0 | 2;
|
|
631
|
+
break;
|
|
632
|
+
default:
|
|
633
|
+
throw UnknownFieldException_init_$Create$(tmp2_index);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
tmp6_input.k22(tmp0_desc);
|
|
637
|
+
return SubjectPublicKeyInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
|
|
638
|
+
};
|
|
639
|
+
protoOf($serializer_2).v1y = function () {
|
|
640
|
+
return this.m7w_1;
|
|
641
|
+
};
|
|
642
|
+
protoOf($serializer_2).p2a = function () {
|
|
643
|
+
// Inline function 'kotlin.arrayOf' call
|
|
644
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
645
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
646
|
+
return [Companion_getInstance_2().l7w_1[0].n1(), $serializer_getInstance_0()];
|
|
647
|
+
};
|
|
648
|
+
var $serializer_instance_2;
|
|
649
|
+
function $serializer_getInstance_4() {
|
|
650
|
+
if ($serializer_instance_2 == null)
|
|
651
|
+
new $serializer_2();
|
|
652
|
+
return $serializer_instance_2;
|
|
653
|
+
}
|
|
654
|
+
function SubjectPublicKeyInfo_init_$Init$(seen0, algorithm, subjectPublicKey, serializationConstructorMarker, $this) {
|
|
655
|
+
if (!(3 === (3 & seen0))) {
|
|
656
|
+
throwMissingFieldException(seen0, 3, $serializer_getInstance_4().m7w_1);
|
|
657
|
+
}
|
|
658
|
+
$this.o7w_1 = algorithm;
|
|
659
|
+
$this.p7w_1 = subjectPublicKey;
|
|
660
|
+
return $this;
|
|
661
|
+
}
|
|
662
|
+
function SubjectPublicKeyInfo_init_$Create$(seen0, algorithm, subjectPublicKey, serializationConstructorMarker) {
|
|
663
|
+
return SubjectPublicKeyInfo_init_$Init$(seen0, algorithm, subjectPublicKey, serializationConstructorMarker, objectCreate(protoOf(SubjectPublicKeyInfo)));
|
|
664
|
+
}
|
|
665
|
+
function SubjectPublicKeyInfo(algorithm, subjectPublicKey) {
|
|
666
|
+
Companion_getInstance_2();
|
|
667
|
+
this.o7w_1 = algorithm;
|
|
668
|
+
this.p7w_1 = subjectPublicKey;
|
|
669
|
+
}
|
|
670
|
+
function RsaKeyAlgorithmIdentifier() {
|
|
671
|
+
}
|
|
672
|
+
protoOf(RsaKeyAlgorithmIdentifier).j7v = function () {
|
|
673
|
+
return get_RSA(Companion_instance);
|
|
674
|
+
};
|
|
675
|
+
protoOf(RsaKeyAlgorithmIdentifier).c7w = function () {
|
|
676
|
+
return null;
|
|
677
|
+
};
|
|
678
|
+
var RsaKeyAlgorithmIdentifier_instance;
|
|
679
|
+
function RsaKeyAlgorithmIdentifier_getInstance() {
|
|
680
|
+
return RsaKeyAlgorithmIdentifier_instance;
|
|
681
|
+
}
|
|
682
|
+
function get_RSA(_this__u8e3s4) {
|
|
683
|
+
return _ObjectIdentifier___init__impl__7hutfr('1.2.840.113549.1.1.1');
|
|
684
|
+
}
|
|
685
|
+
//region block: post-declaration
|
|
686
|
+
protoOf($serializer).q2a = typeParametersSerializers;
|
|
687
|
+
protoOf($serializer_0).q2a = typeParametersSerializers;
|
|
688
|
+
protoOf($serializer_1).q2a = typeParametersSerializers;
|
|
689
|
+
protoOf($serializer_2).q2a = typeParametersSerializers;
|
|
690
|
+
//endregion
|
|
691
|
+
//region block: init
|
|
692
|
+
Companion_instance_0 = new Companion();
|
|
693
|
+
Companion_instance_1 = new Companion_0();
|
|
694
|
+
RsaKeyAlgorithmIdentifier_instance = new RsaKeyAlgorithmIdentifier();
|
|
695
|
+
//endregion
|
|
696
|
+
//region block: exports
|
|
697
|
+
_.$_$ = _.$_$ || {};
|
|
698
|
+
_.$_$.a = EcKeyAlgorithmIdentifier;
|
|
699
|
+
_.$_$.b = EcParameters;
|
|
700
|
+
_.$_$.c = EcPrivateKey;
|
|
701
|
+
_.$_$.d = PrivateKeyInfo;
|
|
702
|
+
_.$_$.e = SubjectPublicKeyInfo;
|
|
703
|
+
_.$_$.f = get_secp256r1;
|
|
704
|
+
_.$_$.g = get_secp384r1;
|
|
705
|
+
_.$_$.h = get_secp521r1;
|
|
706
|
+
_.$_$.i = _EcParameters___init__impl__i4ww9z;
|
|
707
|
+
_.$_$.j = Companion_instance_1;
|
|
708
|
+
_.$_$.k = Companion_getInstance_1;
|
|
709
|
+
_.$_$.l = RsaKeyAlgorithmIdentifier_instance;
|
|
710
|
+
_.$_$.m = Companion_getInstance_2;
|
|
11
711
|
//endregion
|
|
12
712
|
return _;
|
|
13
713
|
}));
|