Cannot access class 'com.soywiz.krypto.Hash'. Check your module classpath for missing or conflicting dependencies
Closed this issue · 3 comments
jittya commented
Cannot access class 'com.soywiz.krypto.Hash'. Check your module classpath for missing or conflicting dependencies
from below function
fun String.hash256(): String {
var byteArray = this.encodeToByteArray()
var sha = SHA256.digest(byteArray)
return sha.base64
}
soywiz commented
That happens on Android? Which version are you using?
jittya commented
version : implementation "com.soywiz.korlibs.krypto:krypto:2.0.0-rc2"
am using it in common module. both common module test and android gives error.
in Test code it gives this error
> Task :app:compileTestKotlinIos FAILED
e: /Users/innovateq/Workspace/NibrasMobile/app/src/commonTest/kotlin/sampleCommonTests/SampleTests.kt: (94, 16): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val ByteArray.base64: String defined in com.soywiz.krypto.encoding
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileTestKotlinIos'.