implement destination offset
All checks were successful
/ test (pull_request) Successful in 27s

This commit is contained in:
2026-01-22 12:18:22 +01:00
parent b00d231da5
commit 8535476674
16 changed files with 41 additions and 34 deletions

View File

@@ -7,15 +7,15 @@ interface HashFunction {
val block: Int
fun hashInto(value: ByteArray, destination: ByteArray)
fun hashInto(value: ByteArray, destination: ByteArray, destinationOffset: Int = 0)
fun hashInto(value: ByteArray, destination: UByteArray) =
fun hashInto(value: ByteArray, destination: UByteArray, destinationOffset: Int = 0) =
hashInto(value, destination.asByteArray())
fun hashInto(value: UByteArray, destination: UByteArray) =
fun hashInto(value: UByteArray, destination: UByteArray, destinationOffset: Int = 0) =
hashInto(value.asByteArray(), destination.asByteArray())
fun hashInto(value: UByteArray, destination: ByteArray) =
fun hashInto(value: UByteArray, destination: ByteArray, destinationOffset: Int = 0) =
hashInto(value.asByteArray(), destination)
fun hash(value: ByteArray): ByteArray =