Files
kdf.kt/src/commonMain/kotlin/com/infendro/kdf/KDF.kt
Infendro 124f6a21a3
All checks were successful
/ test (pull_request) Successful in 1m15s
Upgrade dependencies
2026-02-16 19:52:47 +01:00

16 lines
378 B
Kotlin

package com.infendro.kdf
interface KDF {
val bytes: Int
val bits: Int
get() = bytes * 8
fun hashInto(value: ByteArray, salt: ByteArray, destination: ByteArray, destinationOffset: Int = 0)
fun hash(value: ByteArray, salt: ByteArray): ByteArray {
val result = ByteArray(bytes)
hashInto(value, salt, result)
return result
}
}