INNER CODE UNIT · Kotlin
printStep
terl/lazysodium-java · sample-app/src/main/kotlin/Main.kt:212
private fun printStep(step: String, title: String, vararg descriptions: String) {
log("+ Step $step: $title.")
for (desc: String in descriptions) {
log(" $desc")
}
}
@Throws(SodiumException::class)
private fun genericHashStep1b() {
val randomKey: ByteArray = lazySodium.randomBytesBuf(GenericHash.KEYBYTES)
printStep(
"1b",
"Deterministic key hash using Native",
"The following hashes should be the same as we're using " +
"identical keys for them.",
"We will be using the random key '" + lazySodium.toHexStr(randomKey) + "'."
)
val nativeGH: com.goterl.lazysodium.interfaces.GenericHash.Native =