ionspin / kotlin-multiplatform-libsodium Goto Github PK
View Code? Open in Web Editor NEWA kotlin multiplatform wrapper for libsodium, using directly built libsodium for jvm and native, and libsodium.js for js targets.
License: Apache License 2.0
A kotlin multiplatform wrapper for libsodium, using directly built libsodium for jvm and native, and libsodium.js for js targets.
License: Apache License 2.0
"libsodium" is mistyped as "lisodium" in the Maven IDs in README.md.
Hi, I am trying to test the module on Multiplatform on android, iOS and native platform, Kmm project build fine for android and IOS project, but error with native Main.
simply added sourceSet of commonMain with
implementation("com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.7")
My mingwX64 setup is
mingwX64("native") { binaries { sharedLib { baseName = "libnative" } } }
Any idea?
`mtkSharedModule:nativeMain: Could not resolve com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.7.
Required by:
project :
Possible solution:
Currently using lazy sodium which seems to be rarely updated and latest release still has fixed bugs.
To resolve this JNA wrapper needs to be implemented either here or as a separate library for both Android and Java
This will require
Hi
Looks like this wrapper does not check what libsodium returns on JVM. For example:
Also on Native, although I'm not sure because I didn't ever use Kotlin/Native FFI:
It's not everywhere though, e.g. crypto_pwhash_str_verify
has a check, although it is used to get the result of verification so check suggests itself.
As said in FAQ, -1
means call is failed. I think ignored failures can introduce a serious vulnerability, especially under memory pressure (e.g. as a result of a DoS).
I understand that it is pretty rare case, but protection from targeted attacks is worth something like that:
class LibsodiumException: Exception("Libsodium call failed")
fun Int.ensureSuccessful() {
if(it != 0) throw LibsodiumException()
}
For usage in every applicable place:
actual suspend fun initialize() {
sodiumJna = loadLibrary()
sodiumJna.sodium_init().ensureSuccessful()
isPlatformInitialized = true
}
(offtopic) Also, do you accept pull requests?
Libsodium bindings is functionally for an experimental 0.1.0 releaser. Following tasks need to be done to make it a proper release:
Hi
I had a small POC with it in android, iOS, web, looks great
Would love to use it in real application,
Actually I might use it or fork it then use it if this would give some real use case to the lib
Have couple of question
introducing new attack surfaces
, can you please elaborate on this ? If it's just a wrapper how it can be abused ?sorry i'm using issues to communicate ๐ฌ
Is it possible to use this wrapper for updating GitHub org secrets (reference)? Thanks!
On JS I can't get initialize() to work. It fails with this error:
ReferenceError: $module$libsodium_wrappers_sumo is not defined
at 0.doResume_5yljmg(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:294177)
at JsSodiumLoader.load_e5ock0(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:294230)
at 1.doResume_5yljmg(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:294370)
at LibsodiumInitializer.initialize_slkfnq(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:294405)
at slambda.doResume_5yljmg(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:303806)
at slambda.invoke_nx893v(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:303792)
at slambda.$testBody(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:303861)
at slambda.doResume_5yljmg(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:302120)
at slambda.invoke_c8cfpt(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:302106)
at <global>.l(/var/folders/q4/bk4942ys3g5_gsbchw20c6k00000gn/T/_karma_webpack_796110/commons.js:302158)
Any idea what is going on? (this is in a test function, if that matters) Maybe it has to do with webpack5?
Describe the bug
Documentation of the Libsodium bindings API is either completely missing, or a direct copy from libsodium website
To Reproduce
Look at the API documentation
Expected behavior
A documentation explaining what a method/function does precisely
Platform
Tasks:
Add .md description for each functionality group and add documentation for each function in the group
After adding the dependency to the commonMain
sourceset, build
fails with the following error:
Could not determine the dependencies of task ':jsPackageJson'.
> Could not resolve all dependencies for configuration ':jsNpm'.
> Could not resolve com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4.
Required by:
project :
> No matching variant of com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4 was found. The consumer was configured to find a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js', attribute 'org.jetbrains.kotlin.js.compiler' with value 'legacy' but:
- Variant 'debugApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'debugRuntimeElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4 declares a runtime of a component:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'iosArm32ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'iosArm64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'iosX64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'jsApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'legacy'
- Variant 'jsRuntimeElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4 declares a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js':
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'ir' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.js.compiler' with value 'legacy'
- Variant 'jvmApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'jvmRuntimeElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4 declares a runtime of a component:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'linuxArm64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'linuxX64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'macosX64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'metadataApiElements' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'mingwX64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'releaseApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'releaseRuntimeElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4 declares a runtime of a component:
- Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'tvosArm64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'tvosX64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'watchosArm32ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'watchosArm64ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
- Variant 'watchosX86ApiElements-published' capability com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.4:
- Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js'
- Other compatible attribute:
- Doesn't say anything about org.jetbrains.kotlin.js.compiler (required 'legacy')
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Is JS legacy not supported by this library? Are there any workarounds?
First, thanks for the great work on the library.
We had issues with derived public keys that did match what we got from other Libsodium
libraries.
Digging deeper (thanks to @andreapizzato) we found that the crypto_sign_ed25519_sk_to_curve25519
has been used to convert public keys instead of crypto_sign_ed25519_sk_to_curve25519
So in the Signature
object the ed25519PkToCurve25519
is using the wrong Libsodium function.
actual object Signature {
...
/**
* The sodiumJna.crypto_sign_ed25519_pk_to_curve25519() function converts an Ed25519 public key ed25519_pk to an X25519 public key and stores it into x25519_pk.
*/
actual fun ed25519PkToCurve25519(ed25519PublicKey: UByteArray) : UByteArray {
val x25519PublicKey = UByteArray(crypto_scalarmult_curve25519_BYTES)
sodiumJna.crypto_sign_ed25519_sk_to_curve25519(
x25519PublicKey.asByteArray(),
ed25519PublicKey.asByteArray()
)
return x25519PublicKey
}
actual fun ed25519SkToCurve25519(ed25519SecretKey: UByteArray) : UByteArray {
val x25519SecretKey = UByteArray(crypto_scalarmult_curve25519_BYTES)
sodiumJna.crypto_sign_ed25519_sk_to_curve25519(
x25519SecretKey.asByteArray(),
ed25519SecretKey.asByteArray()
)
return x25519SecretKey
}
...
}
After updating to 0.8.8 when I develop a multiplatform project and I try to run some SwiftUI previews I got:
linker command failed with exit code 1 (use -v to see invocation)
----------------------------------------
LinkDylibError: Failed to build SingleSelectionList.swift
Linking failed: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/SharedFrameworks-iphonesimulator'
Undefined symbols for architecture x86_64:
"_crypto_core_salsa2012", referenced from:
_libsodium_crypto_core_salsa2012_wrapper169 in DodiKit(result.o)
(maybe you meant: knifunptr_libsodium168_crypto_core_salsa2012_constbytes, _libsodium_crypto_core_salsa2012_outputbytes_wrapper165 , knifunptr_libsodium165_crypto_core_salsa2012_outputbytes , _libsodium_crypto_core_salsa2012_constbytes_wrapper168 , knifunptr_libsodium167_crypto_core_salsa2012_keybytes , _libsodium_crypto_core_salsa2012_keybytes_wrapper167 , knifunptr_libsodium166_crypto_core_salsa2012_inputbytes , _libsodium_crypto_core_salsa2012_inputbytes_wrapper166 , _libsodium_crypto_core_salsa2012_wrapper169 , knifunptr_libsodium169_crypto_core_salsa2012 )
"_crypto_core_salsa2012_constbytes", referenced from:
_libsodium_crypto_core_salsa2012_constbytes_wrapper168 in DodiKit(result.o)
(maybe you meant: knifunptr_libsodium168_crypto_core_salsa2012_constbytes, _libsodium_crypto_core_salsa2012_constbytes_wrapper168 )
"_crypto_core_salsa2012_inputbytes", referenced from:
_libsodium_crypto_core_salsa2012_inputbytes_wrapper166 in DodiKit(result.o)
(maybe you meant: knifunptr_libsodium166_crypto_core_salsa2012_inputbytes, _libsodium_crypto_core_salsa2012_inputbytes_wrapper166 )
"_crypto_core_salsa2012_keybytes", referenced from:
_libsodium_crypto_core_salsa2012_keybytes_wrapper167 in DodiKit(result.o)
(maybe you meant: knifunptr_libsodium167_crypto_core_salsa2012_keybytes, _libsodium_crypto_core_salsa2012_keybytes_wrapper167 )
"_crypto_core_salsa2012_outputbytes", referenced from:
_libsodium_crypto_core_salsa2012_outputbytes_wrapper165 in DodiKit(result.o)
(maybe you meant: _libsodium_crypto_core_salsa2012_outputbytes_wrapper165, knifunptr_libsodium165_crypto_core_salsa2012_outputbytes )
"_crypto_core_salsa208", referenced from:
_libsodium_crypto_core_salsa208_wrapper174 in DodiKit(result.o)
(maybe you meant: knifunptr_libsodium174_crypto_core_salsa208, _libsodium_crypto_core_salsa208_inputbytes_wrapper171 , _libsodium_crypto_core_salsa208_constbytes_wrapper173 , knifunptr_libsodium170_crypto_core_salsa208_outputbytes , knifunptr_libsodium171_crypto_core_salsa208_inputbytes , knifunptr_libsodium172_crypto_core_salsa208_keybytes , _libsodium_crypto_core_salsa208_keybytes_wrapper172 , knifunptr_libsodium173_crypto_core_salsa208_constbytes , _libsodium_crypto_core_salsa208_wrapper174 , _libsodium_crypto_core_salsa208_outputbytes_wrapper170 )
"_crypto_core_salsa208_constbytes", referenced from:
_libsodium_crypto_core_salsa208_constbytes_wrapper173 in DodiKit(result.o)
(maybe you meant: _libsodium_crypto_core_salsa208_constbytes_wrapper173, knifunptr_libsodium173_crypto_core_salsa208_constbytes )
"_crypto_core_salsa208_inputbytes", referenced from:
_libsodium_crypto_core_salsa208_inputbytes_wrapper171 in DodiKit(result.o)
(maybe you meant: _libsodium_crypto_core_salsa208_inputbytes_wrapper171, knifunptr_libsodium171_crypto_core_salsa208_inputbytes )
"_crypto_core_salsa208_keybytes", referenced from:
_libsodium_crypto_core_salsa208_keybytes_wrapper172 in DodiKit(result.o)
(maybe you meant: knifunptr_libsodium172_crypto_core_salsa208_keybytes, _libsodium_crypto_core_salsa208_keybytes_wrapper172 )
"_crypto_core_salsa208_outputbytes", referenced from:
_libsodium_crypto_core_salsa208_outputbytes_wrapper170 in DodiKit(result.o)
(maybe you meant: knifunptr_libsodium170_crypto_core_salsa208_outputbytes, _libsodium_crypto_core_salsa208_outputbytes_wrapper170 )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It was working before.
I haven't been able to find functions relating to libsodiums Finite Field arithmetic. If they're available how do I invoke them? Thanks.
Hi! @ionspin
Thank you always for your prompt support. Just a question regarding android minimum SDK level.
The library requires minSDK level of 24, is there a specific reason for the minSDK level? Could it be lower to 21 instead?
That would make this library be more widely accepted.
When I use it in my project, I'm unable to run tests with JUnit on JVM target. JS works fine.
I'm getting this error:
`
Execution failed for task ':crypto:jvmTest'.
Could not resolve all files for configuration ':crypto:jvmTestRuntimeClasspath'.
Could not resolve org.jetbrains.kotlin:kotlin-test-junit5:1.7.10.
Required by:
project :crypto > org.jetbrains.kotlin:kotlin-test:1.7.10
> Module 'org.jetbrains.kotlin:kotlin-test-junit5' has been rejected:
Cannot select module with conflict on capability 'org.jetbrains.kotlin:kotlin-test-framework-impl:1.7.10' also provided by [org.jetbrains.kotlin:kotlin-test-junit:1.6.20-RC2(junitRuntime)]
Could not resolve org.jetbrains.kotlin:kotlin-test-junit:1.6.20-RC2.
Required by:
project :crypto > com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.6 > com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings-jvm:0.8.6
> Module 'org.jetbrains.kotlin:kotlin-test-junit' has been rejected:
Cannot select module with conflict on capability 'org.jetbrains.kotlin:kotlin-test-framework-impl:1.6.20-RC2' also provided by [org.jetbrains.kotlin:kotlin-test-junit5:1.7.10(junit5Runtime)]
This is how I include it:
sourceSets {
val coroutinesVersion: String by System.getProperties()
val kotlinVersion: String by System.getProperties()
val commonMain by getting {
dependencies {
implementation(project(":buffer"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("com.ionspin.kotlin:multiplatform-crypto-libsodium-bindings:0.8.6")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmMain by getting {
dependencies {
}
}
val jvmTest by getting
val jsMain by getting {
dependencies {
implementation(npm("js-base64", "^3.7.2", generateExternals = true))
implementation(npm("@peculiar/webcrypto", "^1.4.0", generateExternals = true))
}
}
val jsTest by getting
}
I think that it's caused by Deps.Common.test
included in commonMain
of the library. Wdyt? Is it necessary for something?
https://github.com/ionspin/kotlin-multiplatform-libsodium/blob/main/multiplatform-crypto-api/build.gradle.kts#L121
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.