diff --git a/docs/docs/indispensable.md b/docs/docs/indispensable.md index 29fd35e1c..6038ad559 100644 --- a/docs/docs/indispensable.md +++ b/docs/docs/indispensable.md @@ -57,9 +57,9 @@ It contains essentials such as: * `CryptoPrivateKey` representing a private key. Currently, we support RSA and EC private keys on NIST curves. RSA keys always include the public key, EC keys may or may not contain a public key and/or curve. * Has an additional specialization `CryptoPrivateKey.WithPublicKey` that always includes a public key * Encodes to PKCS#8 by default - * RSA keys also support `pkcs1Encode()` - * EC keys also support `sec1Encode()` -* `Digest` containing an enumeration of supported + * RSA keys also support PKCS#1 encoding (`.asPKCS1`) + * EC keys also support SEC1 encoding (`.asSEC1`) +* `Digest` containing an enumeration of supported digests * `ECCurve` representing an EC Curve * `ECPoint` representing a point on an elliptic curve * `CryptoSignatre` representing a cryptographic signature including descriptive information regarding the algorithms and signature data diff --git a/indispensable-asn1/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Elements.kt b/indispensable-asn1/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Elements.kt index cb24465bc..f738d4f2e 100644 --- a/indispensable-asn1/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Elements.kt +++ b/indispensable-asn1/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Elements.kt @@ -16,7 +16,6 @@ import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder import kotlin.experimental.ExperimentalObjCName import kotlin.native.ObjCName -import kotlin.reflect.typeOf /** * Base ASN.1 data class. Can either be a primitive (holding a value), or a structure (holding other ASN.1 elements) diff --git a/indispensable-asn1/src/commonTest/kotlin/at/asitplus/signum/indispensable/asn1/CastingTest.kt b/indispensable-asn1/src/commonTest/kotlin/at/asitplus/signum/indispensable/asn1/CastingTest.kt index abce0bc49..71e5952c3 100644 --- a/indispensable-asn1/src/commonTest/kotlin/at/asitplus/signum/indispensable/asn1/CastingTest.kt +++ b/indispensable-asn1/src/commonTest/kotlin/at/asitplus/signum/indispensable/asn1/CastingTest.kt @@ -34,7 +34,7 @@ class CastingTest : FreeSpec({ Asn1.OctetStringEncapsulating { +Asn1.Null() }.let { it.asEncapsulatingOctetString() shouldBe it } //Reinterpreting this way must always work - Asn1.OctetStringEncapsulating { +Asn1.Null() }.let { it.asPrimitiveOctetString() shouldBe it.asPrimitiveOctetString() } + Asn1.OctetStringEncapsulating { +Asn1.Null() }.let { it.asPrimitive() shouldBe it } Asn1.OctetStringEncapsulating { +Asn1.Null() }.let { it.asStructure() shouldBe it } } diff --git a/indispensable-cosef/build.gradle.kts b/indispensable-cosef/build.gradle.kts index 0439b4535..d8652b9df 100644 --- a/indispensable-cosef/build.gradle.kts +++ b/indispensable-cosef/build.gradle.kts @@ -47,6 +47,7 @@ kotlin { commonMain { dependencies { api(project(":indispensable")) + implementation(project(":internals")) api(serialization("cbor")) implementation(libs.multibase) implementation(libs.bignum) //Intellij bug work-around diff --git a/indispensable-internals/src/commonMain/kotlin/at/asitplus/signum/indispensable/internals/Utils.kt b/indispensable-internals/src/commonMain/kotlin/at/asitplus/signum/indispensable/internals/Utils.kt deleted file mode 100644 index 0da17273c..000000000 --- a/indispensable-internals/src/commonMain/kotlin/at/asitplus/signum/indispensable/internals/Utils.kt +++ /dev/null @@ -1,4 +0,0 @@ -package at.asitplus.signum.indispensable.internals - - -infix fun T?.orLazy(block: ()->T) = if (this != null) lazyOf(this) else lazy(block) diff --git a/indispensable-josef/build.gradle.kts b/indispensable-josef/build.gradle.kts index 7dfafde8c..43d6e4108 100644 --- a/indispensable-josef/build.gradle.kts +++ b/indispensable-josef/build.gradle.kts @@ -46,6 +46,7 @@ kotlin { commonMain { dependencies { api(project(":indispensable")) + implementation(project(":internals")) implementation(libs.okio) api(libs.multibase) implementation(libs.bignum) //Intellij bug work-around diff --git a/indispensable-josef/src/jvmTest/kotlin/at/asitplus/signum/indispensable/josef/JsonWebKeyJvmTest.kt b/indispensable-josef/src/jvmTest/kotlin/at/asitplus/signum/indispensable/josef/JsonWebKeyJvmTest.kt index d13bf2a2f..b386e1772 100644 --- a/indispensable-josef/src/jvmTest/kotlin/at/asitplus/signum/indispensable/josef/JsonWebKeyJvmTest.kt +++ b/indispensable-josef/src/jvmTest/kotlin/at/asitplus/signum/indispensable/josef/JsonWebKeyJvmTest.kt @@ -4,9 +4,7 @@ import at.asitplus.signum.indispensable.CryptoPublicKey import at.asitplus.signum.indispensable.CryptoPublicKey.EC.Companion.fromUncompressed import at.asitplus.signum.indispensable.ECCurve import at.asitplus.signum.indispensable.asn1.Asn1Integer -import at.asitplus.signum.indispensable.misc.ensureSize -import at.asitplus.signum.indispensable.asn1.encoding.toTwosComplementByteArray -import at.asitplus.signum.indispensable.asn1.encoding.toUnsignedByteArray +import at.asitplus.signum.internals.ensureSize import at.asitplus.signum.indispensable.asn1.toAsn1Integer import io.kotest.core.spec.style.FreeSpec import io.kotest.matchers.nulls.shouldNotBeNull diff --git a/indispensable/build.gradle.kts b/indispensable/build.gradle.kts index f66f68cb4..31089c22a 100644 --- a/indispensable/build.gradle.kts +++ b/indispensable/build.gradle.kts @@ -60,7 +60,7 @@ kotlin { api(project(":indispensable-asn1")) api(libs.multibase) api(libs.bignum) - implementation(project(":indispensable-internals")) + implementation(project(":internals")) } diff --git a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPrivateKey.kt b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPrivateKey.kt index 1a5c15923..2d5f42408 100644 --- a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPrivateKey.kt +++ b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPrivateKey.kt @@ -7,7 +7,7 @@ import at.asitplus.signum.indispensable.CryptoPublicKey.EC.Companion.asPublicKey import at.asitplus.signum.indispensable.asn1.* import at.asitplus.signum.indispensable.asn1.encoding.* import at.asitplus.signum.indispensable.misc.ANSIECPrefix -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import com.ionspin.kotlin.bignum.integer.BigInteger import com.ionspin.kotlin.bignum.integer.Sign diff --git a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPublicKey.kt b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPublicKey.kt index 60bddc505..bf82e3334 100644 --- a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPublicKey.kt +++ b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoPublicKey.kt @@ -5,7 +5,6 @@ import at.asitplus.catching import at.asitplus.signum.indispensable.asn1.* import at.asitplus.signum.indispensable.asn1.encoding.Asn1.BitString import at.asitplus.signum.indispensable.asn1.encoding.Asn1.Null -import at.asitplus.signum.indispensable.io.ByteArrayBase64Serializer import at.asitplus.signum.indispensable.misc.ANSIECPrefix import at.asitplus.signum.indispensable.misc.ANSIECPrefix.Companion.hasPrefix import at.asitplus.io.BaseN @@ -14,7 +13,6 @@ import at.asitplus.io.UVarInt import at.asitplus.io.multibaseDecode import at.asitplus.io.multibaseEncode import at.asitplus.signum.indispensable.asn1.encoding.* -import at.asitplus.signum.indispensable.misc.ensureSize import com.ionspin.kotlin.bignum.integer.BigInteger import com.ionspin.kotlin.bignum.integer.Sign import kotlinx.serialization.SerialName diff --git a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoSignature.kt b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoSignature.kt index fe628602c..d8f59e9d6 100644 --- a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoSignature.kt +++ b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/CryptoSignature.kt @@ -3,10 +3,10 @@ package at.asitplus.signum.indispensable import at.asitplus.signum.indispensable.asn1.* import at.asitplus.signum.indispensable.asn1.encoding.* import at.asitplus.signum.indispensable.io.Base64Strict -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import at.asitplus.signum.indispensable.misc.BitLength import at.asitplus.signum.indispensable.misc.max -import at.asitplus.signum.indispensable.internals.orLazy +import at.asitplus.signum.internals.orLazy import at.asitplus.signum.indispensable.pki.X509Certificate import com.ionspin.kotlin.bignum.integer.BigInteger import com.ionspin.kotlin.bignum.integer.Sign diff --git a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/ECPoint.kt b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/ECPoint.kt index b846493a4..f0fb618e7 100644 --- a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/ECPoint.kt +++ b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/ECPoint.kt @@ -1,6 +1,6 @@ package at.asitplus.signum.indispensable -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import at.asitplus.signum.indispensable.io.ByteArrayBase64Serializer import at.asitplus.signum.indispensable.misc.compressY import at.asitplus.signum.indispensable.misc.decompressY diff --git a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Addons.kt b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Addons.kt index d2b244559..81ae5d97e 100644 --- a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Addons.kt +++ b/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/asn1/Asn1Addons.kt @@ -3,7 +3,7 @@ package at.asitplus.signum.indispensable.asn1 import at.asitplus.catching import at.asitplus.catchingUnwrapped import at.asitplus.signum.indispensable.asn1.encoding.* -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import com.ionspin.kotlin.bignum.integer.BigInteger import com.ionspin.kotlin.bignum.integer.Sign import com.ionspin.kotlin.bignum.integer.util.fromTwosComplementByteArray diff --git a/indispensable/src/commonTest/kotlin/UtilTest.kt b/indispensable/src/commonTest/kotlin/UtilTest.kt index 39a7a46c5..4dc880bce 100644 --- a/indispensable/src/commonTest/kotlin/UtilTest.kt +++ b/indispensable/src/commonTest/kotlin/UtilTest.kt @@ -1,6 +1,6 @@ package at.asitplus.signum.indispensable -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import at.asitplus.signum.indispensable.misc.BitLength import at.asitplus.signum.indispensable.misc.max import at.asitplus.signum.indispensable.misc.min diff --git a/indispensable/src/iosMain/kotlin/CommonCryptoExtensions.kt b/indispensable/src/iosMain/kotlin/CommonCryptoExtensions.kt index a87ad697e..3a1f959c7 100644 --- a/indispensable/src/iosMain/kotlin/CommonCryptoExtensions.kt +++ b/indispensable/src/iosMain/kotlin/CommonCryptoExtensions.kt @@ -7,7 +7,7 @@ import at.asitplus.catching import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.cinterop.memScoped import platform.Security.* -import at.asitplus.signum.indispensable.internals.* +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.* val SignatureAlgorithm.secKeyAlgorithm: SecKeyAlgorithm get() = when (this) { diff --git a/indispensable/src/jvmMain/kotlin/at/asitplus/signum/indispensable/JcaExtensions.kt b/indispensable/src/jvmMain/kotlin/at/asitplus/signum/indispensable/JcaExtensions.kt index 1a1b004a5..51ece0c33 100644 --- a/indispensable/src/jvmMain/kotlin/at/asitplus/signum/indispensable/JcaExtensions.kt +++ b/indispensable/src/jvmMain/kotlin/at/asitplus/signum/indispensable/JcaExtensions.kt @@ -4,7 +4,7 @@ import at.asitplus.KmmResult import at.asitplus.catching import at.asitplus.signum.indispensable.asn1.toAsn1Integer import at.asitplus.signum.indispensable.asn1.toJavaBigInteger -import at.asitplus.signum.indispensable.internals.isAndroid +import at.asitplus.signum.internals.isAndroid import at.asitplus.signum.indispensable.pki.X509Certificate import com.ionspin.kotlin.bignum.integer.base63.toJavaBigInteger import kotlinx.coroutines.runBlocking diff --git a/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/Pkcs10CertificationRequestJvmTest.kt b/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/Pkcs10CertificationRequestJvmTest.kt index 3dcca0464..7bdaf3627 100644 --- a/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/Pkcs10CertificationRequestJvmTest.kt +++ b/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/Pkcs10CertificationRequestJvmTest.kt @@ -3,7 +3,7 @@ package at.asitplus.signum.indispensable.pki import at.asitplus.signum.indispensable.* import at.asitplus.signum.indispensable.asn1.* import at.asitplus.signum.indispensable.asn1.encoding.encodeToAsn1Primitive -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import at.asitplus.signum.indispensable.asn1.encoding.parse import io.kotest.assertions.withClue import io.kotest.core.spec.style.FreeSpec diff --git a/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/X509CertificateJvmTest.kt b/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/X509CertificateJvmTest.kt index 4247eed0e..7be6d41dd 100644 --- a/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/X509CertificateJvmTest.kt +++ b/indispensable/src/jvmTest/kotlin/at/asitplus/signum/indispensable/pki/X509CertificateJvmTest.kt @@ -2,7 +2,7 @@ package at.asitplus.signum.indispensable.pki import at.asitplus.signum.indispensable.* import at.asitplus.signum.indispensable.asn1.* -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import at.asitplus.signum.indispensable.asn1.encoding.parse import io.kotest.core.spec.style.FreeSpec import io.kotest.matchers.nulls.shouldNotBeNull diff --git a/indispensable-internals/.gitignore b/internals/.gitignore similarity index 100% rename from indispensable-internals/.gitignore rename to internals/.gitignore diff --git a/indispensable-internals/build.gradle.kts b/internals/build.gradle.kts similarity index 95% rename from indispensable-internals/build.gradle.kts rename to internals/build.gradle.kts index f0f29ed51..b5816924c 100644 --- a/indispensable-internals/build.gradle.kts +++ b/internals/build.gradle.kts @@ -64,7 +64,7 @@ kotlin { } exportIosFramework( - "Indispensable-Internals", + "Internals", transitiveExports = false, serialization("json"), datetime(), @@ -81,8 +81,8 @@ publishing { withType { if (this.name != "relocation") artifact(javadocJar) pom { - name.set("Indispensable Internals") - description.set("Kotlin Multiplatform Crypto Core Library, Internal Shared Helpers") + name.set("Internals") + description.set("Kotlin Multiplatform Crypto Library, Internal Shared Helpers") url.set("https://github.com/a-sit-plus/signum") licenses { license { diff --git a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/misc/Utils.kt b/internals/src/commonMain/kotlin/at/asitplus/signum/internals/Utils.kt similarity index 59% rename from indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/misc/Utils.kt rename to internals/src/commonMain/kotlin/at/asitplus/signum/internals/Utils.kt index 563a029aa..b88d0180d 100644 --- a/indispensable/src/commonMain/kotlin/at/asitplus/signum/indispensable/misc/Utils.kt +++ b/internals/src/commonMain/kotlin/at/asitplus/signum/internals/Utils.kt @@ -1,8 +1,8 @@ -package at.asitplus.signum.indispensable.misc +package at.asitplus.signum.internals -/** - * Drops bytes at the start, or adds zero bytes at the start, until the [size] is reached - */ +infix fun T?.orLazy(block: ()->T) = if (this != null) lazyOf(this) else lazy(block) + +/** Drops bytes at the start, or adds zero bytes at the start, until the [size] is reached */ fun ByteArray.ensureSize(size: Int): ByteArray = (this.size - size).let { toDrop -> when { toDrop > 0 -> this.copyOfRange(toDrop, this.size) diff --git a/indispensable-internals/src/iosMain/kotlin/Interop.kt b/internals/src/iosMain/kotlin/at/asitplus/signum/internals/InteropUtils.kt similarity index 98% rename from indispensable-internals/src/iosMain/kotlin/Interop.kt rename to internals/src/iosMain/kotlin/at/asitplus/signum/internals/InteropUtils.kt index 5904aa60f..fd46d6871 100644 --- a/indispensable-internals/src/iosMain/kotlin/Interop.kt +++ b/internals/src/iosMain/kotlin/at/asitplus/signum/internals/InteropUtils.kt @@ -1,6 +1,6 @@ @file:OptIn(ExperimentalForeignApi::class) -package at.asitplus.signum.indispensable.internals +package at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals import kotlinx.cinterop.* import platform.CoreFoundation.CFDictionaryCreateMutable diff --git a/indispensable-internals/src/jvmMain/kotlin/at/asitplus/signum/indispensable/internals/JcaExtensions.kt b/internals/src/jvmMain/kotlin/at/asitplus/signum/internals/JcaUtil.kt similarity index 74% rename from indispensable-internals/src/jvmMain/kotlin/at/asitplus/signum/indispensable/internals/JcaExtensions.kt rename to internals/src/jvmMain/kotlin/at/asitplus/signum/internals/JcaUtil.kt index de864c6f0..1774f9e1a 100644 --- a/indispensable-internals/src/jvmMain/kotlin/at/asitplus/signum/indispensable/internals/JcaExtensions.kt +++ b/internals/src/jvmMain/kotlin/at/asitplus/signum/internals/JcaUtil.kt @@ -1,4 +1,4 @@ -package at.asitplus.signum.indispensable.internals +package at.asitplus.signum.internals val isAndroid by lazy { try { diff --git a/settings.gradle.kts b/settings.gradle.kts index 38140bcce..04439e084 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,7 +19,7 @@ dependencyResolutionManagement { } } -include(":indispensable-internals") +include(":internals") include(":indispensable-asn1") include(":indispensable") include(":indispensable-josef") diff --git a/supreme/build.gradle.kts b/supreme/build.gradle.kts index 67450f2b4..0eb2f2e05 100644 --- a/supreme/build.gradle.kts +++ b/supreme/build.gradle.kts @@ -44,10 +44,11 @@ kotlin { iosSimulatorArm64() sourceSets.commonMain.dependencies { + api(project(":indispensable")) + implementation(project(":internals")) implementation(coroutines()) implementation(napier()) implementation(libs.securerandom) - api(project(":indispensable")) } sourceSets.androidMain.dependencies { diff --git a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/InteropUtils.kt b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/InteropUtils.kt index ee1a16754..f79bd3760 100644 --- a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/InteropUtils.kt +++ b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/InteropUtils.kt @@ -2,9 +2,9 @@ package at.asitplus.signum.supreme -import at.asitplus.signum.indispensable.internals.SwiftException -import at.asitplus.signum.indispensable.internals.takeFromCF -import at.asitplus.signum.indispensable.internals.toNiceString +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.SwiftException +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.takeFromCF +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.toNiceString import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import kotlinx.cinterop.* diff --git a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/os/IosKeychainProvider.kt b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/os/IosKeychainProvider.kt index 068e48651..e47700c49 100644 --- a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/os/IosKeychainProvider.kt +++ b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/os/IosKeychainProvider.kt @@ -4,7 +4,7 @@ package at.asitplus.signum.supreme.os import at.asitplus.KmmResult import at.asitplus.catching import at.asitplus.signum.indispensable.* -import at.asitplus.signum.indispensable.internals.* +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.* import at.asitplus.signum.supreme.swiftasync import at.asitplus.signum.supreme.CFCryptoOperationFailed import at.asitplus.signum.supreme.CryptoOperationFailed diff --git a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/EphemeralKeysImpl.kt b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/EphemeralKeysImpl.kt index d24a5d1bd..dd8fde8c5 100644 --- a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/EphemeralKeysImpl.kt +++ b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/EphemeralKeysImpl.kt @@ -7,7 +7,7 @@ import at.asitplus.catching import at.asitplus.signum.indispensable.* import at.asitplus.signum.supreme.* import at.asitplus.signum.supreme.AutofreeVariable -import at.asitplus.signum.indispensable.internals.* +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.* import kotlinx.cinterop.* import platform.Foundation.NSData import platform.Security.* diff --git a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/PrivateKeySignerImpl.kt b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/PrivateKeySignerImpl.kt index 3ad420618..4fedd71c3 100644 --- a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/PrivateKeySignerImpl.kt +++ b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/PrivateKeySignerImpl.kt @@ -3,7 +3,7 @@ package at.asitplus.signum.supreme.sign import at.asitplus.KmmResult import at.asitplus.signum.indispensable.* import at.asitplus.signum.supreme.* -import at.asitplus.signum.indispensable.internals.* +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.* import kotlinx.cinterop.ExperimentalForeignApi import platform.Foundation.NSData import platform.Security.SecKeyCreateSignature diff --git a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/VerifierImpl.kt b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/VerifierImpl.kt index 0d89652f6..44264a365 100644 --- a/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/VerifierImpl.kt +++ b/supreme/src/iosMain/kotlin/at/asitplus/signum/supreme/sign/VerifierImpl.kt @@ -5,11 +5,11 @@ import at.asitplus.signum.indispensable.CryptoPublicKey import at.asitplus.signum.indispensable.CryptoSignature import at.asitplus.signum.indispensable.ECCurve import at.asitplus.signum.indispensable.SignatureAlgorithm -import at.asitplus.signum.indispensable.misc.ensureSize +import at.asitplus.signum.internals.ensureSize import at.asitplus.signum.indispensable.iosEncoded import at.asitplus.signum.indispensable.nativeDigest import at.asitplus.signum.indispensable.secKeyAlgorithmPreHashed -import at.asitplus.signum.indispensable.internals.* +import at.asitplus.signum.indispensable.internals.at.asitplus.signum.internals.* import at.asitplus.signum.supreme.dsl.DSL import at.asitplus.signum.supreme.UnsupportedCryptoException import kotlinx.cinterop.ExperimentalForeignApi