Signed-off-by: Graham <gpe@openrs2.dev>
@ -224,7 +224,7 @@ object Js5CompressionTest {
}
private fun read(name: String): ByteBuf {
Js5CompressionTest::class.java.getResourceAsStream(name).use { input ->
Js5CompressionTest::class.java.getResourceAsStream("compression/$name").use { input ->
return Unpooled.wrappedBuffer(input.readAllBytes())
@ -61,8 +61,7 @@ object IsaacRandomTest {
private fun readVector(file: String): IntArray {
val path = "/dev/openrs2/crypto/$file"
val input = IsaacRandomTest::class.java.getResourceAsStream(path)
val input = IsaacRandomTest::class.java.getResourceAsStream("isaac/$file")
return BufferedReader(InputStreamReader(input)).useLines { lines ->
val elements = mutableListOf<Int>()
@ -63,8 +63,7 @@ object WhirlpoolTest {
private val NESSIE_ONE_VECTORS = readVectors("nessie-one-vectors.txt")
private fun readVectors(file: String): List<ByteArray> {
val input = WhirlpoolTest::class.java.getResourceAsStream(path)
val input = WhirlpoolTest::class.java.getResourceAsStream("whirlpool/$file")
return input.bufferedReader().use { reader ->
reader.lines()
.map(ByteBufUtil::decodeHexDump)