Progress
This commit is contained in:
1 parent
c5082a0f47
commit
c975bdb248
3 files changed
+19
-13
No files matched your search
+2
-3
@@ -1,17 +1,16 @@
|
||||
package debug.test
|
||||
|
||||
import Sha256State
|
||||
import kotlin.Int
|
||||
import kotlin.UByteArray
|
||||
|
||||
expect class Sha256State
|
||||
|
||||
expect class Hashing {
|
||||
fun init(state: Sha256State): Int
|
||||
fun crypto_hash_sha256_init(state: Sha256State): Int
|
||||
}
|
||||
|
||||
expect class GenericHash {
|
||||
fun init(
|
||||
fun crypto_generichash_init(
|
||||
state: UByteArray,
|
||||
key: UByteArray,
|
||||
outlen: Int
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package debug.test
|
||||
|
||||
import Sha256State
|
||||
import com.goterl.lazycode.lazysodium.SodiumJava
|
||||
import com.goterl.lazycode.lazysodium.interfaces.Hash
|
||||
import kotlin.Int
|
||||
@@ -11,14 +10,14 @@ val sodium: SodiumJava = SodiumJava()
|
||||
actual typealias Sha256State = Hash.State256
|
||||
|
||||
actual class Hashing {
|
||||
actual fun init(state: Sha256State): Int {
|
||||
actual fun crypto_hash_sha256_init(state: Sha256State): Int {
|
||||
println("Debug")
|
||||
return sodium.crypto_hash_sha256_init(state)
|
||||
}
|
||||
}
|
||||
|
||||
actual class GenericHash {
|
||||
actual fun init(
|
||||
actual fun crypto_generichash_init(
|
||||
state: UByteArray,
|
||||
key: UByteArray,
|
||||
outlen: Int
|
||||
|
||||
Reference in new issue
Block a user