change tests to use ByteArray

This commit is contained in:
2026-01-15 22:12:52 +01:00
parent d40df04e2e
commit d06674c28c
20 changed files with 58 additions and 58 deletions

View File

@@ -24,9 +24,9 @@ class `Blake-224 Test` {
0xecU, 0xbeU, 0xe0U, 0x90U,
0x3dU, 0x40U, 0xa8U, 0xa5U,
0x69U, 0xc9U, 0x4eU, 0xedU,
)
).asByteArray()
val actual = function.hash(
UByteArray(0)
ByteArray(0),
)
assertContentEquals(expected, actual)
}
@@ -41,9 +41,9 @@ class `Blake-224 Test` {
0xfeU, 0x3fU, 0x24U, 0x68U,
0xfeU, 0x31U, 0x2cU, 0x73U,
0xa5U, 0x27U, 0x8eU, 0xc5U,
)
).asByteArray()
val actual = function.hash(
UByteArray(1)
ByteArray(1),
)
assertContentEquals(expected, actual)
}
@@ -58,9 +58,9 @@ class `Blake-224 Test` {
0x88U, 0x8dU, 0x82U, 0xc8U,
0xc0U, 0xa9U, 0x17U, 0x91U,
0x3cU, 0xfbU, 0x5dU, 0x04U,
)
).asByteArray()
val actual = function.hash(
UByteArray(72)
ByteArray(72),
)
assertContentEquals(expected, actual)
}

View File

@@ -25,9 +25,9 @@ class `Blake-256 Test` {
0x2fU, 0x67U, 0xc6U, 0x15U,
0x10U, 0xbfU, 0xc4U, 0x75U,
0x13U, 0x84U, 0xeaU, 0x7aU,
)
).asByteArray()
val actual = function.hash(
UByteArray(0)
ByteArray(0),
)
assertContentEquals(expected, actual)
}
@@ -43,9 +43,9 @@ class `Blake-256 Test` {
0x92U, 0x9aU, 0x74U, 0xdaU,
0x23U, 0x10U, 0x9eU, 0x8fU,
0x11U, 0x13U, 0x9cU, 0x87U,
)
).asByteArray()
val actual = function.hash(
UByteArray(1)
ByteArray(1),
)
assertContentEquals(expected, actual)
}
@@ -61,9 +61,9 @@ class `Blake-256 Test` {
0x13U, 0x5dU, 0xecU, 0x31U,
0xe2U, 0x1bU, 0xd9U, 0xabU,
0xdcU, 0xc2U, 0x2dU, 0x41U,
)
).asByteArray()
val actual = function.hash(
UByteArray(72)
ByteArray(72),
)
assertContentEquals(expected, actual)
}

View File

@@ -29,9 +29,9 @@ class `Blake-384 Test` {
0xddU, 0x2bU, 0x47U, 0x88U,
0xb1U, 0xc8U, 0x08U, 0x69U,
0x84U, 0xafU, 0x87U, 0x06U,
)
).asByteArray()
val actual = function.hash(
UByteArray(0)
ByteArray(0),
)
assertContentEquals(expected, actual)
}
@@ -50,10 +50,10 @@ class `Blake-384 Test` {
0x29U, 0x39U, 0x1eU, 0x85U,
0x45U, 0xb5U, 0x27U, 0x2dU,
0x13U, 0xa7U, 0xc2U, 0x87U,
0x9dU, 0xa3U, 0xd8U, 0x07U
)
0x9dU, 0xa3U, 0xd8U, 0x07U,
).asByteArray()
val actual = function.hash(
UByteArray(1)
ByteArray(1),
)
assertContentEquals(expected, actual)
}
@@ -72,10 +72,10 @@ class `Blake-384 Test` {
0x69U, 0x78U, 0x0bU, 0x2dU,
0xaaU, 0x66U, 0xc4U, 0xb2U,
0x24U, 0xa2U, 0xecU, 0x2eU,
0x5dU, 0x09U, 0x17U, 0x4cU
)
0x5dU, 0x09U, 0x17U, 0x4cU,
).asByteArray()
val actual = function.hash(
UByteArray(144)
ByteArray(144),
)
assertContentEquals(expected, actual)
}

View File

@@ -33,9 +33,9 @@ class `Blake-512 Test` {
0xa2U, 0x5aU, 0x63U, 0x6dU,
0x80U, 0xafU, 0x3fU, 0xc7U,
0x91U, 0x3eU, 0xf5U, 0xb8U,
)
).asByteArray()
val actual = function.hash(
UByteArray(0)
ByteArray(0),
)
assertContentEquals(expected, actual)
}
@@ -59,9 +59,9 @@ class `Blake-512 Test` {
0x8bU, 0xd0U, 0x81U, 0xb6U,
0x34U, 0x05U, 0x8bU, 0xe0U,
0xecU, 0x49U, 0xbeU, 0xb3U,
)
).asByteArray()
val actual = function.hash(
UByteArray(1)
ByteArray(1),
)
assertContentEquals(expected, actual)
}
@@ -85,9 +85,9 @@ class `Blake-512 Test` {
0x6eU, 0x01U, 0xadU, 0x95U,
0x89U, 0xc2U, 0x13U, 0x04U,
0x5dU, 0x54U, 0x5dU, 0xdeU,
)
).asByteArray()
val actual = function.hash(
UByteArray(144)
ByteArray(144),
)
assertContentEquals(expected, actual)
}