It's late

This commit is contained in:
Ugljesa Jovanovic 2020-10-20 00:32:42 +02:00
parent 2b43c6e293
commit a210ef2db3
No known key found for this signature in database
GPG Key ID: 178E6DFCECCB0E0F

View File

@ -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()}"
}
}