It's late
This commit is contained in:
parent
2b43c6e293
commit
a210ef2db3
@ -1,6 +1,8 @@
|
|||||||
package com.ionspin.kotlin.crypto.sample
|
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.LibsodiumRandom
|
||||||
|
import com.ionspin.kotlin.crypto.util.encodeToUByteArray
|
||||||
import com.ionspin.kotlin.crypto.util.toHexString
|
import com.ionspin.kotlin.crypto.util.toHexString
|
||||||
|
|
||||||
|
|
||||||
@ -9,4 +11,9 @@ object Sample {
|
|||||||
val random = LibsodiumRandom.buf(32)
|
val random = LibsodiumRandom.buf(32)
|
||||||
println("Random: ${random.toHexString()}")
|
println("Random: ${random.toHexString()}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun hashSomething() : String {
|
||||||
|
val hash = Hash.sha512("123".encodeToUByteArray())
|
||||||
|
return "Hash (SHA512) of 123: ${hash.toHexString()}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user