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

@@ -4,7 +4,7 @@ import kotlin.test.Test
import kotlin.test.assertContentEquals
import kotlin.test.assertEquals
class `SHA3-256 Test` {
class `SHA3-256_Test` {
val function = `SHA3-256`
@Test
@@ -16,19 +16,13 @@ class `SHA3-256 Test` {
@Test
fun `empty bytearray`() {
val expected = ubyteArrayOf(
0xa7U, 0xffU, 0xc6U, 0xf8U,
0xbfU, 0x1eU, 0xd7U, 0x66U,
0x51U, 0xc1U, 0x47U, 0x56U,
0xa0U, 0x61U, 0xd6U, 0x62U,
0xf5U, 0x80U, 0xffU, 0x4dU,
0xe4U, 0x3bU, 0x49U, 0xfaU,
0x82U, 0xd8U, 0x0aU, 0x4bU,
0x80U, 0xf8U, 0x43U, 0x4aU,
).asByteArray()
val actual = function.hash(
ByteArray(0),
val expected = byteArrayOf(
-0x59, -0x01, -0x3a, -0x08, -0x41, +0x1e, -0x29, +0x66,
+0x51, -0x3f, +0x47, +0x56, -0x60, +0x61, -0x2a, +0x62,
-0x0b, -0x80, -0x01, +0x4d, -0x1c, +0x3b, +0x49, -0x06,
-0x7e, -0x28, +0x0a, +0x4b, -0x80, -0x08, +0x43, +0x4a,
)
val actual = function.hash(ByteArray(0))
assertContentEquals(expected, actual)
}
}