remove unsigned support
All checks were successful
/ test (pull_request) Successful in 1m45s

This commit is contained in:
2026-02-08 14:04:41 +01:00
parent e138ec0b6d
commit 902cb060a1
38 changed files with 455 additions and 696 deletions

View File

@@ -9,18 +9,9 @@ interface HashFunction {
fun hashInto(value: ByteArray, destination: ByteArray, destinationOffset: Int = 0)
fun hashInto(value: ByteArray, destination: UByteArray, destinationOffset: Int = 0) =
hashInto(value, destination.asByteArray())
fun hashInto(value: UByteArray, destination: UByteArray, destinationOffset: Int = 0) =
hashInto(value.asByteArray(), destination.asByteArray())
fun hashInto(value: UByteArray, destination: ByteArray, destinationOffset: Int = 0) =
hashInto(value.asByteArray(), destination)
fun hash(value: ByteArray): ByteArray =
ByteArray(bytes).also { hashInto(value, it) }
fun hash(value: UByteArray): UByteArray =
UByteArray(bytes).also { hashInto(value, it) }
fun hash(value: ByteArray): ByteArray {
val result = ByteArray(bytes)
hashInto(value, result)
return result
}
}