It's late

This commit is contained in:
Ugljesa Jovanovic committed 2020-10-20 00:32:42 +02:00
1 parent 2b43c6e293
commit a210ef2db3
1 file changed
+7
@@ -1,6 +1,8 @@
package com.ionspin.kotlin.crypto.sample
import com.ionspin.kotlin.crypto.hash.Hash
import com.ionspin.kotlin.crypto.util.LibsodiumRandom
import com.ionspin.kotlin.crypto.util.encodeToUByteArray
import com.ionspin.kotlin.crypto.util.toHexString
@@ -9,4 +11,9 @@ object Sample {
val random = LibsodiumRandom.buf(32)
println("Random: ${random.toHexString()}")
}
fun hashSomething() : String {
val hash = Hash.sha512("123".encodeToUByteArray())
return "Hash (SHA512) of 123: ${hash.toHexString()}"
}
}