Built and included modified libsodium with additional wrappers, working blake, sha256/512 hashes

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-06-09 20:30:12 +02:00
1 parent 710ac43e8c
commit 197aacac33
30 files changed
+170 -89

No files matched your search

@@ -3,6 +3,7 @@ package com.ionspin.kotlin.crypto.sample
import com.ionspin.kotlin.crypto.Crypto
import com.ionspin.kotlin.crypto.CryptoProvider
import com.ionspin.kotlin.crypto.hash.blake2b.Blake2b
import com.ionspin.kotlin.crypto.hash.encodeToUByteArray
import com.ionspin.kotlin.crypto.util.toHexString
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
@@ -20,7 +21,7 @@ object Sample {
fun blake2b() {
println("Blake2b updateable")
val blake2bUpdateable = Crypto.Blake2b.updateable()
blake2bUpdateable.update("test")
blake2bUpdateable.update("test".encodeToUByteArray())
println(blake2bUpdateable.digest().toHexString())
println("Blake2b stateless")
val statelessResult = Crypto.Blake2b.stateless("test".encodeToByteArray().toUByteArray())