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 `SHA-224 Test` {
class `SHA-224_Test` {
val function = `SHA-224`
@Test
@@ -16,18 +16,13 @@ class `SHA-224 Test` {
@Test
fun `empty bytearray`() {
val expected = ubyteArrayOf(
0xd1U, 0x4aU, 0x02U, 0x8cU,
0x2aU, 0x3aU, 0x2bU, 0xc9U,
0x47U, 0x61U, 0x02U, 0xbbU,
0x28U, 0x82U, 0x34U, 0xc4U,
0x15U, 0xa2U, 0xb0U, 0x1fU,
0x82U, 0x8eU, 0xa6U, 0x2aU,
0xc5U, 0xb3U, 0xe4U, 0x2fU,
).asByteArray()
val actual = function.hash(
ByteArray(0),
val expected = byteArrayOf(
-0x2f, +0x4a, +0x02, -0x74, +0x2a, +0x3a, +0x2b, -0x37,
+0x47, +0x61, +0x02, -0x45, +0x28, -0x7e, +0x34, -0x3c,
+0x15, -0x5e, -0x50, +0x1f, -0x7e, -0x72, -0x5a, +0x2a,
-0x3b, -0x4d, -0x1c, +0x2f,
)
val actual = function.hash(ByteArray(0))
assertContentEquals(expected, actual)
}
}