This commit is contained in:
@@ -4,7 +4,7 @@ import kotlin.test.Test
|
||||
import kotlin.test.assertContentEquals
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class `Blake2s-224 Test` {
|
||||
class `Blake2s-224_Test` {
|
||||
val function = Blake2s(28)
|
||||
|
||||
@Test
|
||||
@@ -16,18 +16,13 @@ class `Blake2s-224 Test` {
|
||||
|
||||
@Test
|
||||
fun `empty bytearray`() {
|
||||
val expected = ubyteArrayOf(
|
||||
0x1fU, 0xa1U, 0x29U, 0x1eU,
|
||||
0x65U, 0x24U, 0x8bU, 0x37U,
|
||||
0xb3U, 0x43U, 0x34U, 0x75U,
|
||||
0xb2U, 0xa0U, 0xddU, 0x63U,
|
||||
0xd5U, 0x4aU, 0x11U, 0xecU,
|
||||
0xc4U, 0xe3U, 0xe0U, 0x34U,
|
||||
0xe7U, 0xbcU, 0x1eU, 0xf4U,
|
||||
).asByteArray()
|
||||
val actual = function.hash(
|
||||
ByteArray(0),
|
||||
val expected = byteArrayOf(
|
||||
+0x1f, -0x5f, +0x29, +0x1e, +0x65, +0x24, -0x75, +0x37,
|
||||
-0x4d, +0x43, +0x34, +0x75, -0x4e, -0x60, -0x23, +0x63,
|
||||
-0x2b, +0x4a, +0x11, -0x14, -0x3c, -0x1d, -0x20, +0x34,
|
||||
-0x19, -0x44, +0x1e, -0x0c,
|
||||
)
|
||||
val actual = function.hash(ByteArray(0))
|
||||
assertContentEquals(expected, actual)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user