@solibo/solibo-sdk 1.0.36 → 1.0.38

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.
Files changed (172) hide show
  1. package/KmLogging-logging.mjs +286 -0
  2. package/KmLogging-logging.mjs.map +1 -0
  3. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +7247 -0
  4. package/Kotlin-DateTime-library-kotlinx-datetime.mjs.map +1 -0
  5. package/KotlinBigInteger-bignum.mjs +5987 -0
  6. package/KotlinBigInteger-bignum.mjs.map +1 -0
  7. package/MultiplatformSettings-multiplatform-settings-no-arg.mjs +15 -0
  8. package/{MultiplatformSettings-multiplatform-settings-no-arg.js.map → MultiplatformSettings-multiplatform-settings-no-arg.mjs.map} +1 -1
  9. package/MultiplatformSettings-multiplatform-settings.mjs +70 -0
  10. package/MultiplatformSettings-multiplatform-settings.mjs.map +1 -0
  11. package/Stately-stately-concurrency.mjs +25 -0
  12. package/{Stately-stately-concurrency.js.map → Stately-stately-concurrency.mjs.map} +1 -1
  13. package/Stately-stately-strict.mjs +8 -0
  14. package/{Stately-stately-strict.js.map → Stately-stately-strict.mjs.map} +1 -1
  15. package/cryptography-kotlin-cryptography-bigint.mjs +241 -0
  16. package/cryptography-kotlin-cryptography-bigint.mjs.map +1 -0
  17. package/cryptography-kotlin-cryptography-core.mjs +1095 -0
  18. package/cryptography-kotlin-cryptography-core.mjs.map +1 -0
  19. package/cryptography-kotlin-cryptography-provider-base.mjs +62 -0
  20. package/cryptography-kotlin-cryptography-provider-base.mjs.map +1 -0
  21. package/cryptography-kotlin-cryptography-provider-optimal.mjs +4 -0
  22. package/{cryptography-kotlin-cryptography-provider-optimal.js.map → cryptography-kotlin-cryptography-provider-optimal.mjs.map} +1 -1
  23. package/cryptography-kotlin-cryptography-provider-webcrypto.mjs +1195 -0
  24. package/cryptography-kotlin-cryptography-provider-webcrypto.mjs.map +1 -0
  25. package/cryptography-kotlin-cryptography-random.mjs +127 -0
  26. package/cryptography-kotlin-cryptography-random.mjs.map +1 -0
  27. package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs +701 -0
  28. package/cryptography-kotlin-cryptography-serialization-asn1-modules.mjs.map +1 -0
  29. package/cryptography-kotlin-cryptography-serialization-asn1.mjs +1413 -0
  30. package/cryptography-kotlin-cryptography-serialization-asn1.mjs.map +1 -0
  31. package/cryptography-kotlin-cryptography-serialization-pem.mjs +153 -0
  32. package/cryptography-kotlin-cryptography-serialization-pem.mjs.map +1 -0
  33. package/index.d.ts +2 -583
  34. package/index.js +2 -582
  35. package/kotlin-kotlin-stdlib.mjs +19205 -0
  36. package/kotlin-kotlin-stdlib.mjs.map +1 -0
  37. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
  38. package/{kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map → kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map} +1 -1
  39. package/kotlinx-atomicfu.mjs +250 -0
  40. package/kotlinx-atomicfu.mjs.map +1 -0
  41. package/kotlinx-browser.mjs +8 -0
  42. package/{kotlinx-browser.js.map → kotlinx-browser.mjs.map} +1 -1
  43. package/kotlinx-coroutines-core.mjs +9836 -0
  44. package/kotlinx-coroutines-core.mjs.map +1 -0
  45. package/kotlinx-io-kotlinx-io-bytestring.mjs +202 -0
  46. package/kotlinx-io-kotlinx-io-bytestring.mjs.map +1 -0
  47. package/kotlinx-io-kotlinx-io-core.mjs +2020 -0
  48. package/kotlinx-io-kotlinx-io-core.mjs.map +1 -0
  49. package/kotlinx-serialization-kotlinx-serialization-core.mjs +6337 -0
  50. package/kotlinx-serialization-kotlinx-serialization-core.mjs.map +1 -0
  51. package/kotlinx-serialization-kotlinx-serialization-json-io.mjs +4 -0
  52. package/{kotlinx-serialization-kotlinx-serialization-json-io.js.map → kotlinx-serialization-kotlinx-serialization-json-io.mjs.map} +1 -1
  53. package/kotlinx-serialization-kotlinx-serialization-json.mjs +5104 -0
  54. package/kotlinx-serialization-kotlinx-serialization-json.mjs.map +1 -0
  55. package/ktor-ktor-client-auth.mjs +1491 -0
  56. package/ktor-ktor-client-auth.mjs.map +1 -0
  57. package/ktor-ktor-client-content-negotiation.mjs +750 -0
  58. package/ktor-ktor-client-content-negotiation.mjs.map +1 -0
  59. package/ktor-ktor-client-core.mjs +14114 -0
  60. package/ktor-ktor-client-core.mjs.map +1 -0
  61. package/ktor-ktor-client-logging.mjs +3263 -0
  62. package/ktor-ktor-client-logging.mjs.map +1 -0
  63. package/ktor-ktor-client-mock.mjs +4 -0
  64. package/{ktor-ktor-client-mock.js.map → ktor-ktor-client-mock.mjs.map} +1 -1
  65. package/ktor-ktor-events.mjs +81 -0
  66. package/ktor-ktor-events.mjs.map +1 -0
  67. package/ktor-ktor-http-cio.mjs +2254 -0
  68. package/ktor-ktor-http-cio.mjs.map +1 -0
  69. package/ktor-ktor-http.mjs +5181 -0
  70. package/ktor-ktor-http.mjs.map +1 -0
  71. package/ktor-ktor-io.mjs +3608 -0
  72. package/ktor-ktor-io.mjs.map +1 -0
  73. package/ktor-ktor-serialization-kotlinx-json.mjs +46 -0
  74. package/{ktor-ktor-serialization-kotlinx-json.js.map → ktor-ktor-serialization-kotlinx-json.mjs.map} +1 -1
  75. package/ktor-ktor-serialization-kotlinx.mjs +843 -0
  76. package/ktor-ktor-serialization-kotlinx.mjs.map +1 -0
  77. package/ktor-ktor-serialization.mjs +364 -0
  78. package/ktor-ktor-serialization.mjs.map +1 -0
  79. package/ktor-ktor-sse.mjs +4 -0
  80. package/ktor-ktor-sse.mjs.map +1 -0
  81. package/ktor-ktor-utils.mjs +3627 -0
  82. package/ktor-ktor-utils.mjs.map +1 -0
  83. package/ktor-ktor-websocket-serialization.mjs +4 -0
  84. package/ktor-ktor-websocket-serialization.mjs.map +1 -0
  85. package/ktor-ktor-websockets.mjs +2535 -0
  86. package/ktor-ktor-websockets.mjs.map +1 -0
  87. package/package.json +1 -1
  88. package/solibo-sdk-sdk-home-api.mjs +193155 -0
  89. package/solibo-sdk-sdk-home-api.mjs.map +1 -0
  90. package/solibo-sdk-sdk.d.mts +13403 -0
  91. package/solibo-sdk-sdk.mjs +7814 -0
  92. package/solibo-sdk-sdk.mjs.map +1 -0
  93. package/KmLogging-logging.js +0 -301
  94. package/KmLogging-logging.js.map +0 -1
  95. package/Kotlin-DateTime-library-kotlinx-datetime.js +0 -7261
  96. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +0 -1
  97. package/KotlinBigInteger-bignum.js +0 -5999
  98. package/KotlinBigInteger-bignum.js.map +0 -1
  99. package/MultiplatformSettings-multiplatform-settings-no-arg.js +0 -29
  100. package/MultiplatformSettings-multiplatform-settings.js +0 -82
  101. package/MultiplatformSettings-multiplatform-settings.js.map +0 -1
  102. package/Stately-stately-concurrency.js +0 -37
  103. package/Stately-stately-strict.js +0 -19
  104. package/cryptography-kotlin-cryptography-bigint.js +0 -254
  105. package/cryptography-kotlin-cryptography-bigint.js.map +0 -1
  106. package/cryptography-kotlin-cryptography-core.js +0 -1110
  107. package/cryptography-kotlin-cryptography-core.js.map +0 -1
  108. package/cryptography-kotlin-cryptography-provider-base.js +0 -77
  109. package/cryptography-kotlin-cryptography-provider-base.js.map +0 -1
  110. package/cryptography-kotlin-cryptography-provider-optimal.js +0 -15
  111. package/cryptography-kotlin-cryptography-provider-webcrypto.js +0 -1222
  112. package/cryptography-kotlin-cryptography-provider-webcrypto.js.map +0 -1
  113. package/cryptography-kotlin-cryptography-random.js +0 -139
  114. package/cryptography-kotlin-cryptography-random.js.map +0 -1
  115. package/cryptography-kotlin-cryptography-serialization-asn1-modules.js +0 -715
  116. package/cryptography-kotlin-cryptography-serialization-asn1-modules.js.map +0 -1
  117. package/cryptography-kotlin-cryptography-serialization-asn1.js +0 -1427
  118. package/cryptography-kotlin-cryptography-serialization-asn1.js.map +0 -1
  119. package/cryptography-kotlin-cryptography-serialization-pem.js +0 -165
  120. package/cryptography-kotlin-cryptography-serialization-pem.js.map +0 -1
  121. package/kotlin-kotlin-stdlib.js +0 -19124
  122. package/kotlin-kotlin-stdlib.js.map +0 -1
  123. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +0 -15
  124. package/kotlinx-atomicfu.js +0 -262
  125. package/kotlinx-atomicfu.js.map +0 -1
  126. package/kotlinx-browser.js +0 -19
  127. package/kotlinx-coroutines-core.js +0 -9849
  128. package/kotlinx-coroutines-core.js.map +0 -1
  129. package/kotlinx-io-kotlinx-io-bytestring.js +0 -214
  130. package/kotlinx-io-kotlinx-io-bytestring.js.map +0 -1
  131. package/kotlinx-io-kotlinx-io-core.js +0 -2035
  132. package/kotlinx-io-kotlinx-io-core.js.map +0 -1
  133. package/kotlinx-serialization-kotlinx-serialization-core.js +0 -6349
  134. package/kotlinx-serialization-kotlinx-serialization-core.js.map +0 -1
  135. package/kotlinx-serialization-kotlinx-serialization-json-io.js +0 -15
  136. package/kotlinx-serialization-kotlinx-serialization-json.js +0 -5117
  137. package/kotlinx-serialization-kotlinx-serialization-json.js.map +0 -1
  138. package/ktor-ktor-client-auth.js +0 -1510
  139. package/ktor-ktor-client-auth.js.map +0 -1
  140. package/ktor-ktor-client-content-negotiation.js +0 -767
  141. package/ktor-ktor-client-content-negotiation.js.map +0 -1
  142. package/ktor-ktor-client-core.js +0 -14143
  143. package/ktor-ktor-client-core.js.map +0 -1
  144. package/ktor-ktor-client-logging.js +0 -3286
  145. package/ktor-ktor-client-logging.js.map +0 -1
  146. package/ktor-ktor-client-mock.js +0 -15
  147. package/ktor-ktor-events.js +0 -94
  148. package/ktor-ktor-events.js.map +0 -1
  149. package/ktor-ktor-http-cio.js +0 -2271
  150. package/ktor-ktor-http-cio.js.map +0 -1
  151. package/ktor-ktor-http.js +0 -5196
  152. package/ktor-ktor-http.js.map +0 -1
  153. package/ktor-ktor-io.js +0 -3628
  154. package/ktor-ktor-io.js.map +0 -1
  155. package/ktor-ktor-serialization-kotlinx-json.js +0 -67
  156. package/ktor-ktor-serialization-kotlinx.js +0 -865
  157. package/ktor-ktor-serialization-kotlinx.js.map +0 -1
  158. package/ktor-ktor-serialization.js +0 -379
  159. package/ktor-ktor-serialization.js.map +0 -1
  160. package/ktor-ktor-sse.js +0 -15
  161. package/ktor-ktor-sse.js.map +0 -1
  162. package/ktor-ktor-utils.js +0 -3643
  163. package/ktor-ktor-utils.js.map +0 -1
  164. package/ktor-ktor-websocket-serialization.js +0 -15
  165. package/ktor-ktor-websocket-serialization.js.map +0 -1
  166. package/ktor-ktor-websockets.js +0 -2552
  167. package/ktor-ktor-websockets.js.map +0 -1
  168. package/solibo-sdk-sdk-home-api.js +0 -196402
  169. package/solibo-sdk-sdk-home-api.js.map +0 -1
  170. package/solibo-sdk-sdk.d.ts +0 -14334
  171. package/solibo-sdk-sdk.js +0 -7897
  172. package/solibo-sdk-sdk.js.map +0 -1
@@ -1,1427 +0,0 @@
1
- (function (factory) {
2
- if (typeof define === 'function' && define.amd)
3
- define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-serialization-kotlinx-serialization-core.js', './cryptography-kotlin-cryptography-bigint.js'], factory);
4
- else if (typeof exports === 'object')
5
- factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./cryptography-kotlin-cryptography-bigint.js'));
6
- else {
7
- if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
- throw new Error("Error loading module 'cryptography-kotlin-cryptography-serialization-asn1'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'cryptography-kotlin-cryptography-serialization-asn1'.");
9
- }
10
- if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
11
- throw new Error("Error loading module 'cryptography-kotlin-cryptography-serialization-asn1'. 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'.");
12
- }
13
- if (typeof globalThis['cryptography-kotlin-cryptography-bigint'] === 'undefined') {
14
- throw new Error("Error loading module 'cryptography-kotlin-cryptography-serialization-asn1'. Its dependency 'cryptography-kotlin-cryptography-bigint' was not found. Please, check whether 'cryptography-kotlin-cryptography-bigint' is loaded prior to 'cryptography-kotlin-cryptography-serialization-asn1'.");
15
- }
16
- globalThis['cryptography-kotlin-cryptography-serialization-asn1'] = factory(typeof globalThis['cryptography-kotlin-cryptography-serialization-asn1'] === 'undefined' ? {} : globalThis['cryptography-kotlin-cryptography-serialization-asn1'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['cryptography-kotlin-cryptography-bigint']);
17
- }
18
- }(function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_dev_whyoleg_cryptography_cryptography_bigint) {
19
- 'use strict';
20
- //region block: imports
21
- var imul = Math.imul;
22
- var clz32 = Math.clz32;
23
- var Unit_instance = kotlin_kotlin.$_$.p5;
24
- var Enum = kotlin_kotlin.$_$.xh;
25
- var protoOf = kotlin_kotlin.$_$.jd;
26
- var initMetadataForClass = kotlin_kotlin.$_$.jc;
27
- var VOID = kotlin_kotlin.$_$.c;
28
- var THROW_CCE = kotlin_kotlin.$_$.hi;
29
- var getStringHashCode = kotlin_kotlin.$_$.hc;
30
- var initMetadataForCompanion = kotlin_kotlin.$_$.kc;
31
- var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h2;
32
- var ByteArraySerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q;
33
- var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f;
34
- var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;
35
- var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b2;
36
- var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;
37
- var initMetadataForObject = kotlin_kotlin.$_$.pc;
38
- var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n2;
39
- var last = kotlin_kotlin.$_$.g8;
40
- var countTrailingZeroBits = kotlin_kotlin.$_$.xi;
41
- var toString = kotlin_kotlin.$_$.md;
42
- var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.u1;
43
- var objectCreate = kotlin_kotlin.$_$.id;
44
- var EmptySerializersModule = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o2;
45
- var BinaryFormat = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t2;
46
- var InlineClassDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.d2;
47
- var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
48
- var copyOfRange = kotlin_kotlin.$_$.v6;
49
- var takeHighestOneBit = kotlin_kotlin.$_$.kj;
50
- var copyOf = kotlin_kotlin.$_$.b7;
51
- var toByte = kotlin_kotlin.$_$.kd;
52
- var arrayCopy = kotlin_kotlin.$_$.f6;
53
- var AbstractDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s1;
54
- var Companion_getInstance = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.h;
55
- var equals = kotlin_kotlin.$_$.ac;
56
- var ByteArraySerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w;
57
- var PolymorphicKind = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h1;
58
- var CLASS_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l;
59
- var SerializationException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e;
60
- var AbstractEncoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t1;
61
- var toBigInt = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.e;
62
- var toBigInt_0 = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.g;
63
- var toBigInt_1 = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.d;
64
- var toBigInt_2 = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.f;
65
- var BigInt = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.a;
66
- var isByteArray = kotlin_kotlin.$_$.sc;
67
- var decodeToBigInt = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.b;
68
- var noWhenBranchMatchedException = kotlin_kotlin.$_$.hj;
69
- var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.e1;
70
- var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.k2;
71
- var encodeToByteArray = kotlin_dev_whyoleg_cryptography_cryptography_bigint.$_$.c;
72
- var split = kotlin_kotlin.$_$.vf;
73
- var toInt = kotlin_kotlin.$_$.qg;
74
- var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.x2;
75
- var toString_0 = kotlin_kotlin.$_$.xg;
76
- var UByte = kotlin_kotlin.$_$.li;
77
- //endregion
78
- //region block: pre-declaration
79
- initMetadataForClass(TagType, 'TagType', VOID, Enum);
80
- initMetadataForClass(ContextSpecificTag, 'ContextSpecificTag');
81
- initMetadataForCompanion(Companion);
82
- initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
83
- initMetadataForClass(BitArray, 'BitArray', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
84
- initMetadataForClass(Der, 'Der', VOID, VOID, [BinaryFormat]);
85
- initMetadataForObject(Default, 'Default', VOID, Der);
86
- initMetadataForCompanion(Companion_0);
87
- initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
88
- initMetadataForClass(ObjectIdentifier, 'ObjectIdentifier', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
89
- initMetadataForClass(ByteArrayInput, 'ByteArrayInput');
90
- initMetadataForClass(ByteArrayOutput, 'ByteArrayOutput', ByteArrayOutput);
91
- initMetadataForClass(DerDecoder, 'DerDecoder', VOID, AbstractDecoder);
92
- initMetadataForClass(DerEncoder, 'DerEncoder', VOID, AbstractEncoder);
93
- initMetadataForClass(DerInput, 'DerInput');
94
- initMetadataForClass(DerOutput, 'DerOutput');
95
- //endregion
96
- var TagType_IMPLICIT_instance;
97
- var TagType_EXPLICIT_instance;
98
- var TagType_entriesInitialized;
99
- function TagType_initEntries() {
100
- if (TagType_entriesInitialized)
101
- return Unit_instance;
102
- TagType_entriesInitialized = true;
103
- TagType_IMPLICIT_instance = new TagType('IMPLICIT', 0);
104
- TagType_EXPLICIT_instance = new TagType('EXPLICIT', 1);
105
- }
106
- function TagType(name, ordinal) {
107
- Enum.call(this, name, ordinal);
108
- }
109
- function TagType_EXPLICIT_getInstance() {
110
- TagType_initEntries();
111
- return TagType_EXPLICIT_instance;
112
- }
113
- function ContextSpecificTag(classIndex, type) {
114
- this.fo4_1 = classIndex;
115
- this.go4_1 = type;
116
- }
117
- protoOf(ContextSpecificTag).equals = function (other) {
118
- if (!(other instanceof ContextSpecificTag))
119
- return false;
120
- var tmp0_other_with_cast = other instanceof ContextSpecificTag ? other : THROW_CCE();
121
- if (!(this.fo4_1 === tmp0_other_with_cast.fo4_1))
122
- return false;
123
- if (!this.go4_1.equals(tmp0_other_with_cast.go4_1))
124
- return false;
125
- return true;
126
- };
127
- protoOf(ContextSpecificTag).hashCode = function () {
128
- var result = imul(getStringHashCode('classIndex'), 127) ^ this.fo4_1;
129
- result = result + (imul(getStringHashCode('type'), 127) ^ this.go4_1.hashCode()) | 0;
130
- return result;
131
- };
132
- protoOf(ContextSpecificTag).toString = function () {
133
- return '@dev.whyoleg.cryptography.serialization.asn1.ContextSpecificTag(' + 'classIndex=' + this.fo4_1 + ', ' + 'type=' + this.go4_1.toString() + ')';
134
- };
135
- function Companion() {
136
- }
137
- protoOf(Companion).g63 = function () {
138
- return $serializer_getInstance();
139
- };
140
- var Companion_instance;
141
- function Companion_getInstance_0() {
142
- return Companion_instance;
143
- }
144
- function $serializer() {
145
- $serializer_instance = this;
146
- var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('dev.whyoleg.cryptography.serialization.asn1.BitArray', this, 2);
147
- tmp0_serialDesc.r13('unusedBits', false);
148
- tmp0_serialDesc.r13('byteArray', false);
149
- this.ho4_1 = tmp0_serialDesc;
150
- }
151
- protoOf($serializer).io4 = function (encoder, value) {
152
- var tmp0_desc = this.ho4_1;
153
- var tmp1_output = encoder.ew(tmp0_desc);
154
- tmp1_output.ox(tmp0_desc, 0, value.jo4_1);
155
- tmp1_output.vx(tmp0_desc, 1, ByteArraySerializer_getInstance(), value.ko4_1);
156
- tmp1_output.fw(tmp0_desc);
157
- };
158
- protoOf($serializer).ct = function (encoder, value) {
159
- return this.io4(encoder, value instanceof BitArray ? value : THROW_CCE());
160
- };
161
- protoOf($serializer).dt = function (decoder) {
162
- var tmp0_desc = this.ho4_1;
163
- var tmp1_flag = true;
164
- var tmp2_index = 0;
165
- var tmp3_bitMask0 = 0;
166
- var tmp4_local0 = 0;
167
- var tmp5_local1 = null;
168
- var tmp6_input = decoder.ew(tmp0_desc);
169
- if (tmp6_input.uw()) {
170
- tmp4_local0 = tmp6_input.jw(tmp0_desc, 0);
171
- tmp3_bitMask0 = tmp3_bitMask0 | 1;
172
- tmp5_local1 = tmp6_input.qw(tmp0_desc, 1, ByteArraySerializer_getInstance(), tmp5_local1);
173
- tmp3_bitMask0 = tmp3_bitMask0 | 2;
174
- } else
175
- while (tmp1_flag) {
176
- tmp2_index = tmp6_input.vw(tmp0_desc);
177
- switch (tmp2_index) {
178
- case -1:
179
- tmp1_flag = false;
180
- break;
181
- case 0:
182
- tmp4_local0 = tmp6_input.jw(tmp0_desc, 0);
183
- tmp3_bitMask0 = tmp3_bitMask0 | 1;
184
- break;
185
- case 1:
186
- tmp5_local1 = tmp6_input.qw(tmp0_desc, 1, ByteArraySerializer_getInstance(), tmp5_local1);
187
- tmp3_bitMask0 = tmp3_bitMask0 | 2;
188
- break;
189
- default:
190
- throw UnknownFieldException_init_$Create$(tmp2_index);
191
- }
192
- }
193
- tmp6_input.fw(tmp0_desc);
194
- return BitArray_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
195
- };
196
- protoOf($serializer).ps = function () {
197
- return this.ho4_1;
198
- };
199
- protoOf($serializer).k14 = function () {
200
- // Inline function 'kotlin.arrayOf' call
201
- // Inline function 'kotlin.js.unsafeCast' call
202
- // Inline function 'kotlin.js.asDynamic' call
203
- return [IntSerializer_getInstance(), ByteArraySerializer_getInstance()];
204
- };
205
- var $serializer_instance;
206
- function $serializer_getInstance() {
207
- if ($serializer_instance == null)
208
- new $serializer();
209
- return $serializer_instance;
210
- }
211
- function BitArray_init_$Init$(seen0, unusedBits, byteArray, serializationConstructorMarker, $this) {
212
- if (!(3 === (3 & seen0))) {
213
- throwMissingFieldException(seen0, 3, $serializer_getInstance().ho4_1);
214
- }
215
- $this.jo4_1 = unusedBits;
216
- $this.ko4_1 = byteArray;
217
- // Inline function 'kotlin.collections.isEmpty' call
218
- if ($this.ko4_1.length === 0) {
219
- // Inline function 'kotlin.check' call
220
- if (!($this.jo4_1 === 0)) {
221
- var message = "empty array couldn't have unused bits";
222
- throw IllegalStateException_init_$Create$(toString(message));
223
- }
224
- } else {
225
- // Inline function 'kotlin.countTrailingZeroBits' call
226
- var this_0 = last($this.ko4_1);
227
- var tmp$ret$3 = countTrailingZeroBits(this_0 | 256);
228
- // Inline function 'kotlin.check' call
229
- if (!($this.jo4_1 <= tmp$ret$3)) {
230
- var message_0 = 'At least ' + $this.jo4_1 + ' last bits should be unused';
231
- throw IllegalStateException_init_$Create$(toString(message_0));
232
- }
233
- }
234
- return $this;
235
- }
236
- function BitArray_init_$Create$(seen0, unusedBits, byteArray, serializationConstructorMarker) {
237
- return BitArray_init_$Init$(seen0, unusedBits, byteArray, serializationConstructorMarker, objectCreate(protoOf(BitArray)));
238
- }
239
- function BitArray(unusedBits, byteArray) {
240
- this.jo4_1 = unusedBits;
241
- this.ko4_1 = byteArray;
242
- // Inline function 'kotlin.collections.isEmpty' call
243
- if (this.ko4_1.length === 0) {
244
- // Inline function 'kotlin.check' call
245
- if (!(this.jo4_1 === 0)) {
246
- var message = "empty array couldn't have unused bits";
247
- throw IllegalStateException_init_$Create$(toString(message));
248
- }
249
- } else {
250
- // Inline function 'kotlin.countTrailingZeroBits' call
251
- var this_0 = last(this.ko4_1);
252
- var tmp$ret$3 = countTrailingZeroBits(this_0 | 256);
253
- // Inline function 'kotlin.check' call
254
- if (!(this.jo4_1 <= tmp$ret$3)) {
255
- var message_0 = 'At least ' + this.jo4_1 + ' last bits should be unused';
256
- throw IllegalStateException_init_$Create$(toString(message_0));
257
- }
258
- }
259
- }
260
- function Default() {
261
- Default_instance = this;
262
- Der.call(this, EmptySerializersModule());
263
- }
264
- var Default_instance;
265
- function Default_getInstance() {
266
- if (Default_instance == null)
267
- new Default();
268
- return Default_instance;
269
- }
270
- function Der(serializersModule) {
271
- Default_getInstance();
272
- this.lo4_1 = serializersModule;
273
- }
274
- protoOf(Der).at = function () {
275
- return this.lo4_1;
276
- };
277
- protoOf(Der).yt = function (serializer, value) {
278
- var output = new ByteArrayOutput();
279
- (new DerEncoder(this, output)).bt(serializer, value);
280
- return output.so4();
281
- };
282
- protoOf(Der).zt = function (deserializer, bytes) {
283
- var input = new ByteArrayInput(bytes);
284
- return (new DerDecoder(this, input)).et(deserializer);
285
- };
286
- function _ObjectIdentifier___init__impl__7hutfr(value) {
287
- return value;
288
- }
289
- function _ObjectIdentifier___get_value__impl__wqzjw3($this) {
290
- return $this;
291
- }
292
- function Companion_0() {
293
- }
294
- protoOf(Companion_0).g63 = function () {
295
- return $serializer_getInstance_0();
296
- };
297
- var Companion_instance_0;
298
- function Companion_getInstance_1() {
299
- return Companion_instance_0;
300
- }
301
- function $serializer_0() {
302
- $serializer_instance_0 = this;
303
- var tmp0_serialDesc = new InlineClassDescriptor('dev.whyoleg.cryptography.serialization.asn1.ObjectIdentifier', this);
304
- tmp0_serialDesc.r13('value', false);
305
- this.xo4_1 = tmp0_serialDesc;
306
- }
307
- protoOf($serializer_0).yo4 = function (encoder, value) {
308
- var tmp0_inlineEncoder = encoder.kx(this.xo4_1);
309
- if (tmp0_inlineEncoder == null)
310
- null;
311
- else {
312
- tmp0_inlineEncoder.ix(_ObjectIdentifier___get_value__impl__wqzjw3(value));
313
- }
314
- };
315
- protoOf($serializer_0).ct = function (encoder, value) {
316
- return this.yo4(encoder, value instanceof ObjectIdentifier ? value.zo4_1 : THROW_CCE());
317
- };
318
- protoOf($serializer_0).ao5 = function (decoder) {
319
- return _ObjectIdentifier___init__impl__7hutfr(decoder.cw(this.xo4_1).aw());
320
- };
321
- protoOf($serializer_0).dt = function (decoder) {
322
- return new ObjectIdentifier(this.ao5(decoder));
323
- };
324
- protoOf($serializer_0).ps = function () {
325
- return this.xo4_1;
326
- };
327
- protoOf($serializer_0).k14 = function () {
328
- // Inline function 'kotlin.arrayOf' call
329
- // Inline function 'kotlin.js.unsafeCast' call
330
- // Inline function 'kotlin.js.asDynamic' call
331
- return [StringSerializer_getInstance()];
332
- };
333
- var $serializer_instance_0;
334
- function $serializer_getInstance_0() {
335
- if ($serializer_instance_0 == null)
336
- new $serializer_0();
337
- return $serializer_instance_0;
338
- }
339
- function ObjectIdentifier__toString_impl_dtwsrd($this) {
340
- return 'ObjectIdentifier(value=' + $this + ')';
341
- }
342
- function ObjectIdentifier__hashCode_impl_7x941i($this) {
343
- return getStringHashCode($this);
344
- }
345
- function ObjectIdentifier__equals_impl_u5dbkq($this, other) {
346
- if (!(other instanceof ObjectIdentifier))
347
- return false;
348
- if (!($this === (other instanceof ObjectIdentifier ? other.zo4_1 : THROW_CCE())))
349
- return false;
350
- return true;
351
- }
352
- function ObjectIdentifier(value) {
353
- this.zo4_1 = value;
354
- }
355
- protoOf(ObjectIdentifier).toString = function () {
356
- return ObjectIdentifier__toString_impl_dtwsrd(this.zo4_1);
357
- };
358
- protoOf(ObjectIdentifier).hashCode = function () {
359
- return ObjectIdentifier__hashCode_impl_7x941i(this.zo4_1);
360
- };
361
- protoOf(ObjectIdentifier).equals = function (other) {
362
- return ObjectIdentifier__equals_impl_u5dbkq(this.zo4_1, other);
363
- };
364
- function get_emptyArray() {
365
- _init_properties_ByteArrayInput_kt__imea6f();
366
- return emptyArray;
367
- }
368
- var emptyArray;
369
- function _get_available__saq0tk($this) {
370
- return $this.co5_1 - $this.do5_1 | 0;
371
- }
372
- function ensureAvailableBytes($this, count) {
373
- // Inline function 'kotlin.check' call
374
- if (!(_get_available__saq0tk($this) >= count)) {
375
- var message = 'Unexpected EOF, available ' + _get_available__saq0tk($this) + ' bytes, requested: ' + count;
376
- throw IllegalStateException_init_$Create$(toString(message));
377
- }
378
- }
379
- function ByteArrayInput(array, startIndex, endIndex) {
380
- startIndex = startIndex === VOID ? 0 : startIndex;
381
- endIndex = endIndex === VOID ? array.length : endIndex;
382
- this.bo5_1 = array;
383
- this.co5_1 = endIndex;
384
- this.do5_1 = startIndex;
385
- }
386
- protoOf(ByteArrayInput).eo5 = function () {
387
- return _get_available__saq0tk(this) === 0;
388
- };
389
- protoOf(ByteArrayInput).toString = function () {
390
- return 'ByteArrayInput(size=' + this.bo5_1.length + ', endIndex=' + this.co5_1 + ', position=' + this.do5_1 + ', available=' + _get_available__saq0tk(this) + ')';
391
- };
392
- protoOf(ByteArrayInput).fo5 = function () {
393
- ensureAvailableBytes(this, 1);
394
- return this.bo5_1[this.do5_1];
395
- };
396
- protoOf(ByteArrayInput).x66 = function () {
397
- ensureAvailableBytes(this, 1);
398
- var _unary__edvuaz = this.do5_1;
399
- this.do5_1 = _unary__edvuaz + 1 | 0;
400
- return this.bo5_1[_unary__edvuaz];
401
- };
402
- protoOf(ByteArrayInput).go5 = function (length) {
403
- ensureAvailableBytes(this, length);
404
- if (length === 0)
405
- return get_emptyArray();
406
- // Inline function 'kotlin.also' call
407
- var this_0 = copyOfRange(this.bo5_1, this.do5_1, this.do5_1 + length | 0);
408
- this.do5_1 = this.do5_1 + length | 0;
409
- return this_0;
410
- };
411
- protoOf(ByteArrayInput).ho5 = function (length) {
412
- ensureAvailableBytes(this, length);
413
- if (length === 0)
414
- return new ByteArrayInput(get_emptyArray());
415
- // Inline function 'kotlin.also' call
416
- var this_0 = new ByteArrayInput(this.bo5_1, this.do5_1, this.do5_1 + length | 0);
417
- this.do5_1 = this.do5_1 + length | 0;
418
- return this_0;
419
- };
420
- var properties_initialized_ByteArrayInput_kt_acgl39;
421
- function _init_properties_ByteArrayInput_kt__imea6f() {
422
- if (!properties_initialized_ByteArrayInput_kt_acgl39) {
423
- properties_initialized_ByteArrayInput_kt_acgl39 = true;
424
- emptyArray = new Int8Array(0);
425
- }
426
- }
427
- function ensureCapacity($this, elementsToAppend) {
428
- if (($this.ro4_1 + elementsToAppend | 0) <= $this.qo4_1.length)
429
- return Unit_instance;
430
- $this.qo4_1 = copyOf($this.qo4_1, takeHighestOneBit($this.ro4_1 + elementsToAppend | 0) << 1);
431
- }
432
- function ByteArrayOutput() {
433
- this.qo4_1 = new Int8Array(32);
434
- this.ro4_1 = 0;
435
- }
436
- protoOf(ByteArrayOutput).g1 = function () {
437
- return this.ro4_1;
438
- };
439
- protoOf(ByteArrayOutput).so4 = function () {
440
- return copyOf(this.qo4_1, this.ro4_1);
441
- };
442
- protoOf(ByteArrayOutput).io5 = function (byte) {
443
- ensureCapacity(this, 1);
444
- var tmp = this.qo4_1;
445
- var _unary__edvuaz = this.ro4_1;
446
- this.ro4_1 = _unary__edvuaz + 1 | 0;
447
- tmp[_unary__edvuaz] = byte;
448
- };
449
- protoOf(ByteArrayOutput).jo5 = function (byte) {
450
- this.io5(toByte(byte));
451
- };
452
- protoOf(ByteArrayOutput).ko5 = function (bytes) {
453
- // Inline function 'kotlin.collections.isEmpty' call
454
- if (bytes.length === 0)
455
- return Unit_instance;
456
- ensureCapacity(this, bytes.length);
457
- var tmp2 = this.qo4_1;
458
- // Inline function 'kotlin.collections.copyInto' call
459
- var destinationOffset = this.ro4_1;
460
- var endIndex = bytes.length;
461
- // Inline function 'kotlin.js.unsafeCast' call
462
- // Inline function 'kotlin.js.asDynamic' call
463
- var tmp = bytes;
464
- // Inline function 'kotlin.js.unsafeCast' call
465
- // Inline function 'kotlin.js.asDynamic' call
466
- arrayCopy(tmp, tmp2, destinationOffset, 0, endIndex);
467
- this.ro4_1 = this.ro4_1 + bytes.length | 0;
468
- };
469
- protoOf(ByteArrayOutput).lo5 = function (output) {
470
- if (output.g1() === 0)
471
- return Unit_instance;
472
- ensureCapacity(this, output.ro4_1);
473
- var tmp0 = output.qo4_1;
474
- var tmp2 = this.qo4_1;
475
- var tmp4 = this.ro4_1;
476
- // Inline function 'kotlin.collections.copyInto' call
477
- var endIndex = output.ro4_1;
478
- // Inline function 'kotlin.js.unsafeCast' call
479
- // Inline function 'kotlin.js.asDynamic' call
480
- var tmp = tmp0;
481
- // Inline function 'kotlin.js.unsafeCast' call
482
- // Inline function 'kotlin.js.asDynamic' call
483
- arrayCopy(tmp, tmp2, tmp4, 0, endIndex);
484
- this.ro4_1 = this.ro4_1 + output.ro4_1 | 0;
485
- };
486
- function getAndResetTagOverride($this) {
487
- var tag = $this.wo4_1;
488
- $this.wo4_1 = null;
489
- return tag;
490
- }
491
- function DerDecoder(der, byteArrayInput) {
492
- AbstractDecoder.call(this);
493
- this.to4_1 = der;
494
- this.uo4_1 = new DerInput(byteArrayInput);
495
- this.vo4_1 = 0;
496
- this.wo4_1 = null;
497
- }
498
- protoOf(DerDecoder).at = function () {
499
- return this.to4_1.at();
500
- };
501
- protoOf(DerDecoder).vw = function (descriptor) {
502
- if (this.uo4_1.eo5())
503
- return -1;
504
- var tag = this.uo4_1.no5();
505
- $l$loop: while (true) {
506
- var index = this.vo4_1;
507
- this.wo4_1 = getElementContextSpecificTag(descriptor, index);
508
- if (descriptor.uu(index)) {
509
- var tmp0 = this.wo4_1;
510
- var tmp$ret$1;
511
- $l$block: {
512
- // Inline function 'kotlin.checkNotNull' call
513
- if (tmp0 == null) {
514
- var message = 'Optional element ' + toString(descriptor) + '[' + index + '] must have context specific tag';
515
- throw IllegalStateException_init_$Create$(toString(message));
516
- } else {
517
- tmp$ret$1 = tmp0;
518
- break $l$block;
519
- }
520
- }
521
- var requiredTag = tmp$ret$1;
522
- if (!(tag === get_tag(requiredTag))) {
523
- this.vo4_1 = this.vo4_1 + 1 | 0;
524
- continue $l$loop;
525
- }
526
- }
527
- var _unary__edvuaz = this.vo4_1;
528
- this.vo4_1 = _unary__edvuaz + 1 | 0;
529
- return _unary__edvuaz;
530
- }
531
- };
532
- protoOf(DerDecoder).qv = function () {
533
- return this.uo4_1.oo5();
534
- };
535
- protoOf(DerDecoder).rv = function () {
536
- return this.uo4_1.po5();
537
- };
538
- protoOf(DerDecoder).tv = function () {
539
- return this.uo4_1.qo5(getAndResetTagOverride(this)).xo2();
540
- };
541
- protoOf(DerDecoder).uv = function () {
542
- return this.uo4_1.qo5(getAndResetTagOverride(this)).yo2();
543
- };
544
- protoOf(DerDecoder).vv = function () {
545
- return this.uo4_1.qo5(getAndResetTagOverride(this)).zo2();
546
- };
547
- protoOf(DerDecoder).wv = function () {
548
- return this.uo4_1.qo5(getAndResetTagOverride(this)).ao3();
549
- };
550
- protoOf(DerDecoder).et = function (deserializer) {
551
- var tmp0_subject = deserializer.ps();
552
- var tmp;
553
- if (equals(tmp0_subject, ByteArraySerializer().ps())) {
554
- var tmp_0 = this.uo4_1.to5(getAndResetTagOverride(this));
555
- tmp = !(tmp_0 == null) ? tmp_0 : THROW_CCE();
556
- } else if (equals(tmp0_subject, Companion_instance.g63().ps())) {
557
- var tmp_1 = this.uo4_1.so5(getAndResetTagOverride(this));
558
- tmp = !(tmp_1 == null) ? tmp_1 : THROW_CCE();
559
- } else if (equals(tmp0_subject, Companion_instance_0.g63().ps())) {
560
- var tmp_2 = this.uo4_1.ro5(getAndResetTagOverride(this));
561
- tmp = !(new ObjectIdentifier(tmp_2) == null) ? new ObjectIdentifier(tmp_2) : THROW_CCE();
562
- } else if (equals(tmp0_subject, Companion_getInstance().g63().ps())) {
563
- var tmp_3 = this.uo4_1.qo5(getAndResetTagOverride(this));
564
- tmp = !(tmp_3 == null) ? tmp_3 : THROW_CCE();
565
- } else {
566
- tmp = deserializer.dt(this);
567
- }
568
- return tmp;
569
- };
570
- protoOf(DerDecoder).ew = function (descriptor) {
571
- var tmp0_subject = descriptor.nu();
572
- var tmp;
573
- var tmp_0;
574
- if (equals(tmp0_subject, CLASS_getInstance())) {
575
- tmp_0 = true;
576
- } else {
577
- tmp_0 = tmp0_subject instanceof PolymorphicKind;
578
- }
579
- if (tmp_0) {
580
- tmp = new DerDecoder(this.to4_1, this.uo4_1.uo5(getAndResetTagOverride(this)));
581
- } else {
582
- throw SerializationException_init_$Create$('This serial kind is not supported as structure: ' + toString(descriptor));
583
- }
584
- return tmp;
585
- };
586
- protoOf(DerDecoder).cw = function (descriptor) {
587
- return this;
588
- };
589
- protoOf(DerDecoder).pw = function (descriptor, index) {
590
- return this;
591
- };
592
- protoOf(DerDecoder).bw = function (enumDescriptor) {
593
- var message = 'Enum decoding is not supported';
594
- throw IllegalStateException_init_$Create$(toString(message));
595
- };
596
- protoOf(DerDecoder).aw = function () {
597
- var message = 'String decoding is not supported';
598
- throw IllegalStateException_init_$Create$(toString(message));
599
- };
600
- protoOf(DerDecoder).zv = function () {
601
- var message = 'Char decoding is not supported';
602
- throw IllegalStateException_init_$Create$(toString(message));
603
- };
604
- protoOf(DerDecoder).sv = function () {
605
- var message = 'Boolean decoding is not supported';
606
- throw IllegalStateException_init_$Create$(toString(message));
607
- };
608
- protoOf(DerDecoder).yv = function () {
609
- var message = 'Double decoding is not supported';
610
- throw IllegalStateException_init_$Create$(toString(message));
611
- };
612
- protoOf(DerDecoder).xv = function () {
613
- var message = 'Float decoding is not supported';
614
- throw IllegalStateException_init_$Create$(toString(message));
615
- };
616
- protoOf(DerDecoder).pv = function () {
617
- var message = 'should not be called';
618
- throw IllegalStateException_init_$Create$(toString(message));
619
- };
620
- function getAndResetTagOverride_0($this) {
621
- var tag = $this.po4_1;
622
- $this.po4_1 = null;
623
- return tag;
624
- }
625
- function DerEncoder(der, byteArrayOutput, parentOutput) {
626
- parentOutput = parentOutput === VOID ? null : parentOutput;
627
- AbstractEncoder.call(this);
628
- this.mo4_1 = der;
629
- this.no4_1 = parentOutput;
630
- this.oo4_1 = new DerOutput(byteArrayOutput);
631
- this.po4_1 = null;
632
- }
633
- protoOf(DerEncoder).at = function () {
634
- return this.mo4_1.at();
635
- };
636
- protoOf(DerEncoder).ay = function (descriptor, index) {
637
- return false;
638
- };
639
- protoOf(DerEncoder).xw = function (descriptor, index) {
640
- this.po4_1 = getElementContextSpecificTag(descriptor, index);
641
- return true;
642
- };
643
- protoOf(DerEncoder).yx = function () {
644
- };
645
- protoOf(DerEncoder).zw = function () {
646
- return this.oo4_1.wo5();
647
- };
648
- protoOf(DerEncoder).bx = function (value) {
649
- return this.oo4_1.xo5(getAndResetTagOverride_0(this), toBigInt(value));
650
- };
651
- protoOf(DerEncoder).cx = function (value) {
652
- return this.oo4_1.xo5(getAndResetTagOverride_0(this), toBigInt_0(value));
653
- };
654
- protoOf(DerEncoder).dx = function (value) {
655
- return this.oo4_1.xo5(getAndResetTagOverride_0(this), toBigInt_1(value));
656
- };
657
- protoOf(DerEncoder).ex = function (value) {
658
- return this.oo4_1.xo5(getAndResetTagOverride_0(this), toBigInt_2(value));
659
- };
660
- protoOf(DerEncoder).bt = function (serializer, value) {
661
- var tmp0_subject = serializer.ps();
662
- var tmp;
663
- if (equals(tmp0_subject, ByteArraySerializer().ps())) {
664
- var tmp_0 = getAndResetTagOverride_0(this);
665
- this.oo4_1.ao6(tmp_0, (!(value == null) ? isByteArray(value) : false) ? value : THROW_CCE());
666
- tmp = Unit_instance;
667
- } else if (equals(tmp0_subject, Companion_instance.g63().ps())) {
668
- var tmp_1 = getAndResetTagOverride_0(this);
669
- this.oo4_1.zo5(tmp_1, value instanceof BitArray ? value : THROW_CCE());
670
- tmp = Unit_instance;
671
- } else if (equals(tmp0_subject, Companion_instance_0.g63().ps())) {
672
- var tmp_2 = getAndResetTagOverride_0(this);
673
- this.oo4_1.yo5(tmp_2, value instanceof ObjectIdentifier ? value.zo4_1 : THROW_CCE());
674
- tmp = Unit_instance;
675
- } else if (equals(tmp0_subject, Companion_getInstance().g63().ps())) {
676
- var tmp_3 = getAndResetTagOverride_0(this);
677
- this.oo4_1.xo5(tmp_3, value instanceof BigInt ? value : THROW_CCE());
678
- tmp = Unit_instance;
679
- } else {
680
- serializer.ct(this, value);
681
- tmp = Unit_instance;
682
- }
683
- return tmp;
684
- };
685
- protoOf(DerEncoder).ew = function (descriptor) {
686
- var tmp0_subject = descriptor.nu();
687
- var tmp;
688
- var tmp_0;
689
- if (equals(tmp0_subject, CLASS_getInstance())) {
690
- tmp_0 = true;
691
- } else {
692
- tmp_0 = tmp0_subject instanceof PolymorphicKind;
693
- }
694
- if (tmp_0) {
695
- tmp = new DerEncoder(this.mo4_1, new ByteArrayOutput(), this.oo4_1);
696
- } else {
697
- throw SerializationException_init_$Create$('This serial kind is not supported as structure: ' + toString(descriptor));
698
- }
699
- return tmp;
700
- };
701
- protoOf(DerEncoder).fw = function (descriptor) {
702
- var tmp0 = this.no4_1;
703
- var tmp$ret$1;
704
- $l$block: {
705
- // Inline function 'kotlin.checkNotNull' call
706
- if (tmp0 == null) {
707
- var message = 'Should be called after beginStructure';
708
- throw IllegalStateException_init_$Create$(toString(message));
709
- } else {
710
- tmp$ret$1 = tmp0;
711
- break $l$block;
712
- }
713
- }
714
- tmp$ret$1.bo6(getAndResetTagOverride_0(this), this.oo4_1);
715
- };
716
- protoOf(DerEncoder).kx = function (descriptor) {
717
- return this;
718
- };
719
- protoOf(DerEncoder).co6 = function (enumDescriptor, index) {
720
- var message = 'Enum encoding is not supported';
721
- throw IllegalStateException_init_$Create$(toString(message));
722
- };
723
- protoOf(DerEncoder).jx = function (enumDescriptor, index) {
724
- return this.co6(enumDescriptor, index);
725
- };
726
- protoOf(DerEncoder).ix = function (value) {
727
- var message = 'String encoding is not supported';
728
- throw IllegalStateException_init_$Create$(toString(message));
729
- };
730
- protoOf(DerEncoder).hx = function (value) {
731
- var message = 'Char encoding is not supported';
732
- throw IllegalStateException_init_$Create$(toString(message));
733
- };
734
- protoOf(DerEncoder).ax = function (value) {
735
- var message = 'Boolean encoding is not supported';
736
- throw IllegalStateException_init_$Create$(toString(message));
737
- };
738
- protoOf(DerEncoder).fx = function (value) {
739
- var message = 'Float encoding is not supported';
740
- throw IllegalStateException_init_$Create$(toString(message));
741
- };
742
- protoOf(DerEncoder).gx = function (value) {
743
- var message = 'Double encoding is not supported';
744
- throw IllegalStateException_init_$Create$(toString(message));
745
- };
746
- protoOf(DerEncoder).yw = function (value) {
747
- var message = 'should not be called';
748
- throw IllegalStateException_init_$Create$(toString(message));
749
- };
750
- function DerInput(input) {
751
- this.mo5_1 = input;
752
- }
753
- protoOf(DerInput).eo5 = function () {
754
- return this.mo5_1.eo5();
755
- };
756
- protoOf(DerInput).no5 = function () {
757
- return this.mo5_1.fo5();
758
- };
759
- protoOf(DerInput).oo5 = function () {
760
- return !(this.no5() === 5);
761
- };
762
- protoOf(DerInput).po5 = function () {
763
- readRequestedTag(this.mo5_1, 5);
764
- var length = readLength(this.mo5_1);
765
- // Inline function 'kotlin.check' call
766
- if (!(length === 0)) {
767
- var message = 'NULL tag length should be zero, but was: ' + length;
768
- throw IllegalStateException_init_$Create$(toString(message));
769
- }
770
- return null;
771
- };
772
- protoOf(DerInput).qo5 = function (tagOverride) {
773
- var tmp0 = this.mo5_1;
774
- var tmp$ret$1;
775
- $l$block: {
776
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.readTagWithOverride' call
777
- if (tagOverride == null) {
778
- readRequestedTag(tmp0, 2);
779
- var length = readLength(tmp0);
780
- var bytes = tmp0.go5(length);
781
- tmp$ret$1 = decodeToBigInt(bytes);
782
- break $l$block;
783
- }
784
- readRequestedTag(tmp0, get_tag(tagOverride));
785
- var tmp;
786
- switch (tagOverride.go4_1.a1_1) {
787
- case 0:
788
- var length_0 = readLength(tmp0);
789
- var bytes_0 = tmp0.go5(length_0);
790
- tmp = decodeToBigInt(bytes_0);
791
- break;
792
- case 1:
793
- var length_1 = readLength(tmp0);
794
- var explicitInput = tmp0.ho5(length_1);
795
- readRequestedTag(explicitInput, 2);
796
- var length_2 = readLength(explicitInput);
797
- var bytes_1 = explicitInput.go5(length_2);
798
- tmp = decodeToBigInt(bytes_1);
799
- break;
800
- default:
801
- noWhenBranchMatchedException();
802
- break;
803
- }
804
- tmp$ret$1 = tmp;
805
- }
806
- return tmp$ret$1;
807
- };
808
- protoOf(DerInput).so5 = function (tagOverride) {
809
- var tmp0 = this.mo5_1;
810
- var tmp$ret$7;
811
- $l$block: {
812
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.readTagWithOverride' call
813
- if (tagOverride == null) {
814
- readRequestedTag(tmp0, 3);
815
- var length = readLength(tmp0);
816
- var unusedBits = tmp0.x66();
817
- var bytes = tmp0.go5(length - 1 | 0);
818
- // Inline function 'kotlin.collections.isEmpty' call
819
- if (bytes.length === 0) {
820
- // Inline function 'kotlin.check' call
821
- if (!(unusedBits === 0)) {
822
- var message = 'wrong number of unused bits, expected 0, received: ' + unusedBits;
823
- throw IllegalStateException_init_$Create$(toString(message));
824
- }
825
- } else {
826
- // Inline function 'kotlin.countTrailingZeroBits' call
827
- var this_0 = last(bytes);
828
- var trailingZeros = countTrailingZeroBits(this_0 | 256);
829
- // Inline function 'kotlin.check' call
830
- if (!(unusedBits <= trailingZeros)) {
831
- var message_0 = 'Not all unused bits are zeros, expected at least ' + unusedBits + ' trailing zeros, received ' + trailingZeros;
832
- throw IllegalStateException_init_$Create$(toString(message_0));
833
- }
834
- }
835
- tmp$ret$7 = new BitArray(unusedBits, bytes);
836
- break $l$block;
837
- }
838
- readRequestedTag(tmp0, get_tag(tagOverride));
839
- var tmp;
840
- switch (tagOverride.go4_1.a1_1) {
841
- case 0:
842
- var length_0 = readLength(tmp0);
843
- var unusedBits_0 = tmp0.x66();
844
- var bytes_0 = tmp0.go5(length_0 - 1 | 0);
845
- // Inline function 'kotlin.collections.isEmpty' call
846
-
847
- if (bytes_0.length === 0) {
848
- // Inline function 'kotlin.check' call
849
- if (!(unusedBits_0 === 0)) {
850
- var message_1 = 'wrong number of unused bits, expected 0, received: ' + unusedBits_0;
851
- throw IllegalStateException_init_$Create$(toString(message_1));
852
- }
853
- } else {
854
- // Inline function 'kotlin.countTrailingZeroBits' call
855
- var this_1 = last(bytes_0);
856
- var trailingZeros_0 = countTrailingZeroBits(this_1 | 256);
857
- // Inline function 'kotlin.check' call
858
- if (!(unusedBits_0 <= trailingZeros_0)) {
859
- var message_2 = 'Not all unused bits are zeros, expected at least ' + unusedBits_0 + ' trailing zeros, received ' + trailingZeros_0;
860
- throw IllegalStateException_init_$Create$(toString(message_2));
861
- }
862
- }
863
-
864
- tmp = new BitArray(unusedBits_0, bytes_0);
865
- break;
866
- case 1:
867
- var length_1 = readLength(tmp0);
868
- var explicitInput = tmp0.ho5(length_1);
869
- readRequestedTag(explicitInput, 3);
870
- var length_2 = readLength(explicitInput);
871
- var unusedBits_1 = explicitInput.x66();
872
- var bytes_1 = explicitInput.go5(length_2 - 1 | 0);
873
- // Inline function 'kotlin.collections.isEmpty' call
874
-
875
- if (bytes_1.length === 0) {
876
- // Inline function 'kotlin.check' call
877
- if (!(unusedBits_1 === 0)) {
878
- var message_3 = 'wrong number of unused bits, expected 0, received: ' + unusedBits_1;
879
- throw IllegalStateException_init_$Create$(toString(message_3));
880
- }
881
- } else {
882
- // Inline function 'kotlin.countTrailingZeroBits' call
883
- var this_2 = last(bytes_1);
884
- var trailingZeros_1 = countTrailingZeroBits(this_2 | 256);
885
- // Inline function 'kotlin.check' call
886
- if (!(unusedBits_1 <= trailingZeros_1)) {
887
- var message_4 = 'Not all unused bits are zeros, expected at least ' + unusedBits_1 + ' trailing zeros, received ' + trailingZeros_1;
888
- throw IllegalStateException_init_$Create$(toString(message_4));
889
- }
890
- }
891
-
892
- tmp = new BitArray(unusedBits_1, bytes_1);
893
- break;
894
- default:
895
- noWhenBranchMatchedException();
896
- break;
897
- }
898
- tmp$ret$7 = tmp;
899
- }
900
- return tmp$ret$7;
901
- };
902
- protoOf(DerInput).to5 = function (tagOverride) {
903
- var tmp0 = this.mo5_1;
904
- var tmp$ret$1;
905
- $l$block: {
906
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.readTagWithOverride' call
907
- if (tagOverride == null) {
908
- readRequestedTag(tmp0, 4);
909
- var length = readLength(tmp0);
910
- tmp$ret$1 = tmp0.go5(length);
911
- break $l$block;
912
- }
913
- readRequestedTag(tmp0, get_tag(tagOverride));
914
- var tmp;
915
- switch (tagOverride.go4_1.a1_1) {
916
- case 0:
917
- var length_0 = readLength(tmp0);
918
- tmp = tmp0.go5(length_0);
919
- break;
920
- case 1:
921
- var length_1 = readLength(tmp0);
922
- var explicitInput = tmp0.ho5(length_1);
923
- readRequestedTag(explicitInput, 4);
924
- var length_2 = readLength(explicitInput);
925
- tmp = explicitInput.go5(length_2);
926
- break;
927
- default:
928
- noWhenBranchMatchedException();
929
- break;
930
- }
931
- tmp$ret$1 = tmp;
932
- }
933
- return tmp$ret$1;
934
- };
935
- protoOf(DerInput).ro5 = function (tagOverride) {
936
- var tmp0 = this.mo5_1;
937
- var tmp$ret$1;
938
- $l$block: {
939
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.readTagWithOverride' call
940
- if (tagOverride == null) {
941
- readRequestedTag(tmp0, 6);
942
- var length = readLength(tmp0);
943
- var slice = tmp0.ho5(length);
944
- tmp$ret$1 = _ObjectIdentifier___init__impl__7hutfr(readOidElements(slice));
945
- break $l$block;
946
- }
947
- readRequestedTag(tmp0, get_tag(tagOverride));
948
- var tmp;
949
- switch (tagOverride.go4_1.a1_1) {
950
- case 0:
951
- var length_0 = readLength(tmp0);
952
- var slice_0 = tmp0.ho5(length_0);
953
- tmp = new ObjectIdentifier(_ObjectIdentifier___init__impl__7hutfr(readOidElements(slice_0)));
954
- break;
955
- case 1:
956
- var length_1 = readLength(tmp0);
957
- var explicitInput = tmp0.ho5(length_1);
958
- readRequestedTag(explicitInput, 6);
959
- var length_2 = readLength(explicitInput);
960
- var slice_1 = explicitInput.ho5(length_2);
961
- tmp = new ObjectIdentifier(_ObjectIdentifier___init__impl__7hutfr(readOidElements(slice_1)));
962
- break;
963
- default:
964
- noWhenBranchMatchedException();
965
- break;
966
- }
967
- tmp$ret$1 = tmp.zo4_1;
968
- }
969
- return tmp$ret$1;
970
- };
971
- protoOf(DerInput).uo5 = function (tagOverride) {
972
- var tmp0 = this.mo5_1;
973
- var tmp$ret$1;
974
- $l$block: {
975
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.readTagWithOverride' call
976
- if (tagOverride == null) {
977
- readRequestedTag(tmp0, 48);
978
- var length = readLength(tmp0);
979
- tmp$ret$1 = tmp0.ho5(length);
980
- break $l$block;
981
- }
982
- readRequestedTag(tmp0, get_tag(tagOverride));
983
- var tmp;
984
- switch (tagOverride.go4_1.a1_1) {
985
- case 0:
986
- var length_0 = readLength(tmp0);
987
- tmp = tmp0.ho5(length_0);
988
- break;
989
- case 1:
990
- var length_1 = readLength(tmp0);
991
- var explicitInput = tmp0.ho5(length_1);
992
- readRequestedTag(explicitInput, 48);
993
- var length_2 = readLength(explicitInput);
994
- tmp = explicitInput.ho5(length_2);
995
- break;
996
- default:
997
- noWhenBranchMatchedException();
998
- break;
999
- }
1000
- tmp$ret$1 = tmp;
1001
- }
1002
- return tmp$ret$1;
1003
- };
1004
- function readRequestedTag(_this__u8e3s4, tag) {
1005
- var currentTag = _this__u8e3s4.x66();
1006
- // Inline function 'kotlin.check' call
1007
- if (!(currentTag === tag)) {
1008
- var message = "Requested tag '" + DerTag_name(tag) + "', received: '" + DerTag_name(currentTag) + "'";
1009
- throw IllegalStateException_init_$Create$(toString(message));
1010
- }
1011
- }
1012
- function readLength(_this__u8e3s4) {
1013
- var first = _this__u8e3s4.x66();
1014
- if (first >= 0)
1015
- return first;
1016
- var numberOfLengthBytes = first & 127;
1017
- // Inline function 'kotlin.check' call
1018
- if (!(numberOfLengthBytes <= 4)) {
1019
- var message = 'Supported number of bytes for tag length are in range 1..4, but was: ' + numberOfLengthBytes + ' ';
1020
- throw IllegalStateException_init_$Create$(toString(message));
1021
- }
1022
- var length = 0;
1023
- // Inline function 'kotlin.repeat' call
1024
- var inductionVariable = 0;
1025
- if (inductionVariable < numberOfLengthBytes)
1026
- do {
1027
- var index = inductionVariable;
1028
- inductionVariable = inductionVariable + 1 | 0;
1029
- length = (length << 8) + (_this__u8e3s4.x66() & 255) | 0;
1030
- }
1031
- while (inductionVariable < numberOfLengthBytes);
1032
- // Inline function 'kotlin.check' call
1033
- if (!(length > 0)) {
1034
- var message_0 = 'length overflow: ' + length;
1035
- throw IllegalStateException_init_$Create$(toString(message_0));
1036
- }
1037
- return length;
1038
- }
1039
- function readOidElements(_this__u8e3s4) {
1040
- // Inline function 'kotlin.text.buildString' call
1041
- // Inline function 'kotlin.apply' call
1042
- var this_0 = StringBuilder_init_$Create$();
1043
- var first = readOidElement(_this__u8e3s4);
1044
- if (first < 40)
1045
- this_0.s(_Char___init__impl__6a9atx(48)).s(_Char___init__impl__6a9atx(46)).yc(first);
1046
- else if (first < 80)
1047
- this_0.s(_Char___init__impl__6a9atx(49)).s(_Char___init__impl__6a9atx(46)).yc(first - 40 | 0);
1048
- else
1049
- this_0.s(_Char___init__impl__6a9atx(50)).s(_Char___init__impl__6a9atx(46)).yc(first - 80 | 0);
1050
- while (!_this__u8e3s4.eo5()) {
1051
- this_0.s(_Char___init__impl__6a9atx(46)).yc(readOidElement(_this__u8e3s4));
1052
- }
1053
- return this_0.toString();
1054
- }
1055
- function readOidElement(_this__u8e3s4) {
1056
- var element = 0;
1057
- do {
1058
- var b = _this__u8e3s4.x66();
1059
- element = (element << 7) + (b & 127) | 0;
1060
- }
1061
- while ((b & 128) === 128);
1062
- // Inline function 'kotlin.check' call
1063
- if (!(element >= 0)) {
1064
- var message = 'element overflow: ' + element;
1065
- throw IllegalStateException_init_$Create$(toString(message));
1066
- }
1067
- return element;
1068
- }
1069
- function DerOutput(output) {
1070
- this.vo5_1 = output;
1071
- }
1072
- protoOf(DerOutput).wo5 = function () {
1073
- this.vo5_1.io5(5);
1074
- writeLength(this.vo5_1, 0);
1075
- };
1076
- protoOf(DerOutput).xo5 = function (tagOverride, value) {
1077
- var tmp0 = this.vo5_1;
1078
- $l$block: {
1079
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeTagWithOverride' call
1080
- if (tagOverride == null) {
1081
- tmp0.io5(2);
1082
- writeBytes(tmp0, encodeToByteArray(value));
1083
- break $l$block;
1084
- }
1085
- tmp0.io5(get_tag(tagOverride));
1086
- switch (tagOverride.go4_1.a1_1) {
1087
- case 0:
1088
- writeBytes(tmp0, encodeToByteArray(value));
1089
- break;
1090
- case 1:
1091
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1092
-
1093
- // Inline function 'kotlin.apply' call
1094
-
1095
- var this_0 = new ByteArrayOutput();
1096
- this_0.io5(2);
1097
- writeBytes(this_0, encodeToByteArray(value));
1098
- writeBytes_0(tmp0, this_0);
1099
- break;
1100
- default:
1101
- noWhenBranchMatchedException();
1102
- break;
1103
- }
1104
- }
1105
- };
1106
- protoOf(DerOutput).zo5 = function (tagOverride, bits) {
1107
- var tmp0 = this.vo5_1;
1108
- $l$block: {
1109
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeTagWithOverride' call
1110
- if (tagOverride == null) {
1111
- tmp0.io5(3);
1112
- writeLength(tmp0, bits.ko4_1.length + 1 | 0);
1113
- tmp0.jo5(bits.jo4_1);
1114
- tmp0.ko5(bits.ko4_1);
1115
- break $l$block;
1116
- }
1117
- tmp0.io5(get_tag(tagOverride));
1118
- switch (tagOverride.go4_1.a1_1) {
1119
- case 0:
1120
- writeLength(tmp0, bits.ko4_1.length + 1 | 0);
1121
- tmp0.jo5(bits.jo4_1);
1122
- tmp0.ko5(bits.ko4_1);
1123
- break;
1124
- case 1:
1125
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1126
-
1127
- // Inline function 'kotlin.apply' call
1128
-
1129
- var this_0 = new ByteArrayOutput();
1130
- this_0.io5(3);
1131
- writeLength(this_0, bits.ko4_1.length + 1 | 0);
1132
- this_0.jo5(bits.jo4_1);
1133
- this_0.ko5(bits.ko4_1);
1134
- writeBytes_0(tmp0, this_0);
1135
- break;
1136
- default:
1137
- noWhenBranchMatchedException();
1138
- break;
1139
- }
1140
- }
1141
- };
1142
- protoOf(DerOutput).ao6 = function (tagOverride, bytes) {
1143
- var tmp0 = this.vo5_1;
1144
- $l$block: {
1145
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeTagWithOverride' call
1146
- if (tagOverride == null) {
1147
- tmp0.io5(4);
1148
- writeBytes(tmp0, bytes);
1149
- break $l$block;
1150
- }
1151
- tmp0.io5(get_tag(tagOverride));
1152
- switch (tagOverride.go4_1.a1_1) {
1153
- case 0:
1154
- writeBytes(tmp0, bytes);
1155
- break;
1156
- case 1:
1157
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1158
-
1159
- // Inline function 'kotlin.apply' call
1160
-
1161
- var this_0 = new ByteArrayOutput();
1162
- this_0.io5(4);
1163
- writeBytes(this_0, bytes);
1164
- writeBytes_0(tmp0, this_0);
1165
- break;
1166
- default:
1167
- noWhenBranchMatchedException();
1168
- break;
1169
- }
1170
- }
1171
- };
1172
- protoOf(DerOutput).yo5 = function (tagOverride, value) {
1173
- var tmp0 = this.vo5_1;
1174
- $l$block: {
1175
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeTagWithOverride' call
1176
- if (tagOverride == null) {
1177
- tmp0.io5(6);
1178
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1179
- // Inline function 'kotlin.apply' call
1180
- var this_0 = new ByteArrayOutput();
1181
- writeOidElements(this_0, split(_ObjectIdentifier___get_value__impl__wqzjw3(value), ['.']));
1182
- writeBytes_0(tmp0, this_0);
1183
- break $l$block;
1184
- }
1185
- tmp0.io5(get_tag(tagOverride));
1186
- switch (tagOverride.go4_1.a1_1) {
1187
- case 0:
1188
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1189
-
1190
- // Inline function 'kotlin.apply' call
1191
-
1192
- var this_1 = new ByteArrayOutput();
1193
- writeOidElements(this_1, split(_ObjectIdentifier___get_value__impl__wqzjw3(value), ['.']));
1194
- writeBytes_0(tmp0, this_1);
1195
- break;
1196
- case 1:
1197
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1198
-
1199
- // Inline function 'kotlin.apply' call
1200
-
1201
- var this_2 = new ByteArrayOutput();
1202
- this_2.io5(6);
1203
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1204
-
1205
- // Inline function 'kotlin.apply' call
1206
-
1207
- var this_3 = new ByteArrayOutput();
1208
- writeOidElements(this_3, split(_ObjectIdentifier___get_value__impl__wqzjw3(value), ['.']));
1209
- writeBytes_0(this_2, this_3);
1210
- writeBytes_0(tmp0, this_2);
1211
- break;
1212
- default:
1213
- noWhenBranchMatchedException();
1214
- break;
1215
- }
1216
- }
1217
- };
1218
- protoOf(DerOutput).bo6 = function (tagOverride, bytes) {
1219
- var tmp0 = this.vo5_1;
1220
- $l$block: {
1221
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeTagWithOverride' call
1222
- if (tagOverride == null) {
1223
- tmp0.io5(48);
1224
- writeBytes_0(tmp0, bytes.vo5_1);
1225
- break $l$block;
1226
- }
1227
- tmp0.io5(get_tag(tagOverride));
1228
- switch (tagOverride.go4_1.a1_1) {
1229
- case 0:
1230
- writeBytes_0(tmp0, bytes.vo5_1);
1231
- break;
1232
- case 1:
1233
- // Inline function 'dev.whyoleg.cryptography.serialization.asn1.internal.writeBytes' call
1234
-
1235
- // Inline function 'kotlin.apply' call
1236
-
1237
- var this_0 = new ByteArrayOutput();
1238
- this_0.io5(48);
1239
- writeBytes_0(this_0, bytes.vo5_1);
1240
- writeBytes_0(tmp0, this_0);
1241
- break;
1242
- default:
1243
- noWhenBranchMatchedException();
1244
- break;
1245
- }
1246
- }
1247
- };
1248
- function writeLength(_this__u8e3s4, length) {
1249
- if (length < 128)
1250
- return _this__u8e3s4.jo5(length);
1251
- // Inline function 'kotlin.countLeadingZeroBits' call
1252
- var numberOfLengthBytes = 4 - (clz32(length) / 8 | 0) | 0;
1253
- _this__u8e3s4.jo5(numberOfLengthBytes | 128);
1254
- // Inline function 'kotlin.repeat' call
1255
- var inductionVariable = 0;
1256
- if (inductionVariable < numberOfLengthBytes)
1257
- do {
1258
- var index = inductionVariable;
1259
- inductionVariable = inductionVariable + 1 | 0;
1260
- _this__u8e3s4.jo5(length >>> imul(8, (numberOfLengthBytes - 1 | 0) - index | 0) | 0);
1261
- }
1262
- while (inductionVariable < numberOfLengthBytes);
1263
- }
1264
- function writeBytes(_this__u8e3s4, bytes) {
1265
- writeLength(_this__u8e3s4, bytes.length);
1266
- _this__u8e3s4.ko5(bytes);
1267
- }
1268
- function writeOidElements(_this__u8e3s4, elements) {
1269
- // Inline function 'kotlin.check' call
1270
- if (!(elements.g1() >= 2)) {
1271
- var message = 'at least 2 components expected but was ' + elements.g1();
1272
- throw IllegalStateException_init_$Create$(toString(message));
1273
- }
1274
- writeOidElement(_this__u8e3s4, imul(writeOidElements$element(elements, 0), 40) + writeOidElements$element(elements, 1) | 0);
1275
- // Inline function 'kotlin.repeat' call
1276
- var times = elements.g1() - 2 | 0;
1277
- var inductionVariable = 0;
1278
- if (inductionVariable < times)
1279
- do {
1280
- var index = inductionVariable;
1281
- inductionVariable = inductionVariable + 1 | 0;
1282
- writeOidElement(_this__u8e3s4, writeOidElements$element(elements, index + 2 | 0));
1283
- }
1284
- while (inductionVariable < times);
1285
- }
1286
- function writeBytes_0(_this__u8e3s4, bytes) {
1287
- writeLength(_this__u8e3s4, bytes.g1());
1288
- _this__u8e3s4.lo5(bytes);
1289
- }
1290
- function writeOidElement(_this__u8e3s4, element) {
1291
- if (element < 128)
1292
- return _this__u8e3s4.jo5(element);
1293
- // Inline function 'kotlin.countLeadingZeroBits' call
1294
- var l = (32 - clz32(element) | 0) / 7 | 0;
1295
- // Inline function 'kotlin.repeat' call
1296
- var inductionVariable = 0;
1297
- if (inductionVariable < l)
1298
- do {
1299
- var index = inductionVariable;
1300
- inductionVariable = inductionVariable + 1 | 0;
1301
- var value = element >>> imul(l - index | 0, 7) | 0;
1302
- if (!(value === 0)) {
1303
- _this__u8e3s4.jo5(value & 127 | 128);
1304
- }
1305
- }
1306
- while (inductionVariable < l);
1307
- _this__u8e3s4.jo5(element & 127);
1308
- }
1309
- function writeOidElements$element($elements, index) {
1310
- return toInt($elements.h1(index));
1311
- }
1312
- function getElementContextSpecificTag(_this__u8e3s4, index) {
1313
- var tmp0 = _this__u8e3s4.su(index);
1314
- var tmp$ret$1;
1315
- $l$block: {
1316
- // Inline function 'kotlin.collections.firstOrNull' call
1317
- var _iterator__ex2g4s = tmp0.t();
1318
- while (_iterator__ex2g4s.u()) {
1319
- var element = _iterator__ex2g4s.v();
1320
- if (element instanceof ContextSpecificTag) {
1321
- tmp$ret$1 = element;
1322
- break $l$block;
1323
- }
1324
- }
1325
- tmp$ret$1 = null;
1326
- }
1327
- var tmp = tmp$ret$1;
1328
- var tmp0_elvis_lhs = tmp instanceof ContextSpecificTag ? tmp : null;
1329
- var tmp_0;
1330
- if (tmp0_elvis_lhs == null) {
1331
- return null;
1332
- } else {
1333
- tmp_0 = tmp0_elvis_lhs;
1334
- }
1335
- var annotation = tmp_0;
1336
- // Inline function 'kotlin.check' call
1337
- if (!(annotation.fo4_1 < 31)) {
1338
- var message = 'Context specific tag class must be less than 31, but was ' + annotation.fo4_1;
1339
- throw IllegalStateException_init_$Create$(toString(message));
1340
- }
1341
- return annotation;
1342
- }
1343
- function get_tag(_this__u8e3s4) {
1344
- var contextSpecificTag = _this__u8e3s4.fo4_1 | 128;
1345
- var tmp;
1346
- switch (_this__u8e3s4.go4_1.a1_1) {
1347
- case 0:
1348
- tmp = toByte(contextSpecificTag);
1349
- break;
1350
- case 1:
1351
- tmp = toByte(contextSpecificTag | 32);
1352
- break;
1353
- default:
1354
- noWhenBranchMatchedException();
1355
- break;
1356
- }
1357
- return tmp;
1358
- }
1359
- function DerTag_name(tag) {
1360
- var tmp;
1361
- if (tag === 2) {
1362
- tmp = 'INTEGER';
1363
- } else if (tag === 3) {
1364
- tmp = 'BIT_STRING';
1365
- } else if (tag === 4) {
1366
- tmp = 'OCTET_STRING';
1367
- } else if (tag === 5) {
1368
- tmp = 'NULL';
1369
- } else if (tag === 6) {
1370
- tmp = 'OID';
1371
- } else if (tag === 48) {
1372
- tmp = 'SEQUENCE';
1373
- } else {
1374
- var intTag = tag;
1375
- var tmp_0;
1376
- if (hasFlag(intTag, 128)) {
1377
- var tmp_1;
1378
- if (hasFlag(intTag, 32)) {
1379
- // Inline function 'kotlin.toUByte' call
1380
- var this_0 = (intTag - 128 | 0) - 32 | 0;
1381
- var tmp$ret$0 = _UByte___init__impl__g9hnc4(toByte(this_0));
1382
- tmp_1 = 'CONTEXT_SPECIFIC:EXPLICIT[' + new UByte(tmp$ret$0) + ']';
1383
- } else {
1384
- // Inline function 'kotlin.toUByte' call
1385
- var this_1 = intTag - 128 | 0;
1386
- var tmp$ret$1 = _UByte___init__impl__g9hnc4(toByte(this_1));
1387
- tmp_1 = 'CONTEXT_SPECIFIC:IMPLICIT[' + new UByte(tmp$ret$1) + ']';
1388
- }
1389
- tmp_0 = tmp_1;
1390
- } else {
1391
- // Inline function 'kotlin.toUByte' call
1392
- var tmp$ret$2 = _UByte___init__impl__g9hnc4(tag);
1393
- tmp_0 = 'UNKNOWN[0x' + toString_0(tmp$ret$2, 16) + ']';
1394
- }
1395
- tmp = tmp_0;
1396
- }
1397
- return tmp;
1398
- }
1399
- function hasFlag(_this__u8e3s4, flag) {
1400
- return (_this__u8e3s4 & flag) === flag;
1401
- }
1402
- //region block: post-declaration
1403
- protoOf($serializer).l14 = typeParametersSerializers;
1404
- protoOf($serializer_0).l14 = typeParametersSerializers;
1405
- //endregion
1406
- //region block: init
1407
- Companion_instance = new Companion();
1408
- Companion_instance_0 = new Companion_0();
1409
- //endregion
1410
- //region block: exports
1411
- _.$_$ = _.$_$ || {};
1412
- _.$_$.a = BitArray;
1413
- _.$_$.b = ContextSpecificTag;
1414
- _.$_$.c = ObjectIdentifier;
1415
- _.$_$.d = TagType_EXPLICIT_getInstance;
1416
- _.$_$.e = _ObjectIdentifier___init__impl__7hutfr;
1417
- _.$_$.f = ObjectIdentifier__hashCode_impl_7x941i;
1418
- _.$_$.g = ObjectIdentifier__toString_impl_dtwsrd;
1419
- _.$_$.h = $serializer_getInstance;
1420
- _.$_$.i = Default_getInstance;
1421
- _.$_$.j = $serializer_getInstance_0;
1422
- _.$_$.k = Companion_instance_0;
1423
- //endregion
1424
- return _;
1425
- }));
1426
-
1427
- //# sourceMappingURL=cryptography-kotlin-cryptography-serialization-asn1.js.map