Working js libsodium, need to change apis to suspend

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-05-27 23:49:08 +02:00
1 parent 1009b92d33
commit 781c9c1b61
20 files changed
+153 -26

No files matched your search

@@ -0,0 +1,12 @@
package com.ionspin.kotlin.crypto
/**
* Created by Ugljesa Jovanovic
* ugljesa.jovanovic@ionspin.com
* on 27-May-2020
*/
interface CryptoProvider {
suspend fun initialize()
}
@@ -39,7 +39,7 @@ interface UpdatableHash : Hash {
@ExperimentalUnsignedTypes
interface StatelessHash : Hash {
fun digest(inputString: String, key: String? = null, hashLength: Int = MAX_HASH_BYTES): UByteArray
suspend fun digest(inputString: String, key: String? = null, hashLength: Int = MAX_HASH_BYTES): UByteArray
fun digest(
inputMessage: UByteArray = ubyteArrayOf(),