Closed jvondermarck closed 2 months ago
Hey!
Could you please check if you have added provider
dependencies.
F.e for iOS + Android case it will be something like this:
kotlin {
sourceSets {
commonMain.dependencies {
implementation(project.dependencies.platform("dev.whyoleg.cryptography:cryptography-bom:0.3.1"))
implementation("dev.whyoleg.cryptography:cryptography-core")
}
androidMain.dependencies {
implementation("dev.whyoleg.cryptography:cryptography-provider-jdk")
}
iosMain.dependencies {
implementation("dev.whyoleg.cryptography:cryptography-provider-openssl3-prebuilt")
// or `apple` provider
// implementation("dev.whyoleg.cryptography:cryptography-provider-apple")
}
}
}
Wow thank you SO SO much @whyoleg !! It works perfectly now !
So I just added these two libraries iOS and Android in my build.gradle.kts
and it immediately worked, there is no need for people who might ask, to use expect
/ actual
in both platforms to set up the CryptographyProvider :)
Thank you for your quick answer ! Have a good day.
In my Kotlin Compose Multiplatform app I declare the Provider this way to be able to encrypt and decrypt text with
AES.CBC
in my class :And when I run my program I have this error :
And when I try to use the method
registerProvider
I have an error because theRegistry
object contains an error annotation :"API of everything what is implemented in providers is experimental for now and subject to change (if possible in backward-compatible way)"
Find below your current code: