Files
hash.kt/src/commonMain/kotlin/com/infendro/hash/HashFunction.kt
Infendro 902cb060a1
All checks were successful
/ test (pull_request) Successful in 1m45s
remove unsigned support
2026-02-08 14:04:41 +01:00

18 lines
368 B
Kotlin

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