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 `SHAKE128 Test` {
class SHAKE128_Test {
val function = SHAKE128(32)
@Test
@@ -16,19 +16,13 @@ class `SHAKE128 Test` {
@Test
fun `empty bytearray`() {
val expected = ubyteArrayOf(
0x7fU, 0x9cU, 0x2bU, 0xa4U,
0xe8U, 0x8fU, 0x82U, 0x7dU,
0x61U, 0x60U, 0x45U, 0x50U,
0x76U, 0x05U, 0x85U, 0x3eU,
0xd7U, 0x3bU, 0x80U, 0x93U,
0xf6U, 0xefU, 0xbcU, 0x88U,
0xebU, 0x1aU, 0x6eU, 0xacU,
0xfaU, 0x66U, 0xefU, 0x26U,
).asByteArray()
val actual = function.hash(
ByteArray(0),
val expected = byteArrayOf(
+0x7f, -0x64, +0x2b, -0x5c, -0x18, -0x71, -0x7e, +0x7d,
+0x61, +0x60, +0x45, +0x50, +0x76, +0x05, -0x7b, +0x3e,
-0x29, +0x3b, -0x80, -0x6d, -0x0a, -0x11, -0x44, -0x78,
-0x15, +0x1a, +0x6e, -0x54, -0x06, +0x66, -0x11, +0x26,
)
val actual = function.hash(ByteArray(0))
assertContentEquals(expected, actual)
}
}