Is there a KMP library for encryption and decrypti...
# multiplatform
o
Is there a KMP library for encryption and decryption using AES algorithm?
o
Hi, take a look at this repo: https://github.com/whyoleg/cryptography-kotlin Maybe this is what you need
o
It should well be. I'll check it out and revert. Thanks
@Oleg Smirnov @Oleg Yukhnevich I discovered that i have to register/initialize the provider before I could use the library, however i have a blocker and unable to do that. I am unable to sync gradle when i added the provider dependency. "implementation("dev.whyoleg.cryptographycryptography provider jdk0.3.1")" I got this error "Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration 'sharediosX64CompilationDependenciesMetadata'." I appreciate if you could help with a look in.
o
Hey! Probably you've added
provider-jdk
dependency in
commonMain
Could you try to do what I suggested here: https://github.com/whyoleg/cryptography-kotlin/issues/27#issuecomment-2245797420? I do want to update some docs with better examples on how to setup project for KMP for upcoming release, but can't find time for it 😞
o
@Oleg Yukhnevich It worked! thanks
🎉 1
h
@Oleg Yukhnevich how to do only encrypted string and decrypted also given string. for example i have global variable url base:
Copy code
const val baseUrl= "<https://www.baseurl.com>"
const val pathWay = "/login"
then how to return above become like this :
Copy code
const val baseUrl= "ASf2342554326234623asfaasfvagwerg"
const val pathWay = "1242asfcat3qsfvsaga"
when descrypted back into koin got back original string url?
616 Views