Currently inside the crypto_api package we find the following piece of code:
fun <T> loadClass(name: String): T = try {
@Suppress("UNCHECKED_CAST")
Class.forName("org.kethereum.crypto.impl.$name").newInstance() as T
} catch (e: ClassNotFoundException) {
throw RuntimeException("There is not implementation found for $name - you need to either depend on crypto_impl_spongycastle or crypto_impl_bouncycastle")
}
While this works for JVM based project, I am not sure it will work on multiplatform projects too.
I think, but I might be wrong, that we could replace the loadClass method with the actual/expected mechanism allowing this library to be used inside multiplatform projects too.
Currently inside the
crypto_api
package we find the following piece of code:While this works for JVM based project, I am not sure it will work on multiplatform projects too.
I think, but I might be wrong, that we could replace the
loadClass
method with theactual/expected
mechanism allowing this library to be used inside multiplatform projects too.