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-384 Test` {
class `SHA-384_Test` {
val function = `SHA-384`
@Test
@@ -16,23 +16,15 @@ class `SHA-384 Test` {
@Test
fun `empty bytearray`() {
val expected = ubyteArrayOf(
0x38U, 0xb0U, 0x60U, 0xa7U,
0x51U, 0xacU, 0x96U, 0x38U,
0x4cU, 0xd9U, 0x32U, 0x7eU,
0xb1U, 0xb1U, 0xe3U, 0x6aU,
0x21U, 0xfdU, 0xb7U, 0x11U,
0x14U, 0xbeU, 0x07U, 0x43U,
0x4cU, 0x0cU, 0xc7U, 0xbfU,
0x63U, 0xf6U, 0xe1U, 0xdaU,
0x27U, 0x4eU, 0xdeU, 0xbfU,
0xe7U, 0x6fU, 0x65U, 0xfbU,
0xd5U, 0x1aU, 0xd2U, 0xf1U,
0x48U, 0x98U, 0xb9U, 0x5bU,
).asByteArray()
val actual = function.hash(
ByteArray(0),
val expected = byteArrayOf(
+0x38, -0x50, +0x60, -0x59, +0x51, -0x54, -0x6a, +0x38,
+0x4c, -0x27, +0x32, +0x7e, -0x4f, -0x4f, -0x1d, +0x6a,
+0x21, -0x03, -0x49, +0x11, +0x14, -0x42, +0x07, +0x43,
+0x4c, +0x0c, -0x39, -0x41, +0x63, -0x0a, -0x1f, -0x26,
+0x27, +0x4e, -0x22, -0x41, -0x19, +0x6f, +0x65, -0x05,
-0x2b, +0x1a, -0x2e, -0x0f, +0x48, -0x68, -0x47, +0x5b,
)
val actual = function.hash(ByteArray(0))
assertContentEquals(expected, actual)
}
}