diff --git a/build.gradle.kts b/build.gradle.kts index c3c1ba8..23481fd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -104,6 +104,7 @@ dependencies { compileOnly("org.tukaani:xz:1.9") // LZMA support, optional + testImplementation("com.dorkbox:HexUtilities:1.0") // watch-out for circular deps! testImplementation("io.netty:netty-buffer:4.1.96.Final") testImplementation("com.esotericsoftware:kryo:5.5.0") testImplementation("org.lz4:lz4-java:1.8.0") diff --git a/test/dorkbox/bytes/TestBase58.kt b/test/dorkbox/bytes/TestBase58.kt index 1af2192..ed22c2a 100644 --- a/test/dorkbox/bytes/TestBase58.kt +++ b/test/dorkbox/bytes/TestBase58.kt @@ -15,6 +15,7 @@ */ package dorkbox.bytes +import dorkbox.hex.hexToByteArray import org.junit.Assert.assertTrue import org.junit.Test diff --git a/test/dorkbox/bytes/TestHashing.kt b/test/dorkbox/bytes/TestHashing.kt index 9fc13a1..ae7fd95 100644 --- a/test/dorkbox/bytes/TestHashing.kt +++ b/test/dorkbox/bytes/TestHashing.kt @@ -15,6 +15,7 @@ */ package dorkbox.bytes +import dorkbox.hex.toHexString import org.junit.Assert.* import org.junit.Test import java.io.File @@ -61,7 +62,7 @@ class TestHashing { // https://stackoverflow.com/questions/54247407/why-utf-8-bom-bytes-efbbbf-can-be-replaced-by-ufeff // FEFF is the BOM for UTF_16 (required by RFC 2781 for charsets) - assertEquals("feff" + ("123123123123".toBytes16().toNoPrefixHexString()), "123123123123".toByteArray(Charsets.UTF_16).toNoPrefixHexString()) + assertEquals("feff" + ("123123123123".toBytes16().toHexString(false)), "123123123123".toByteArray(Charsets.UTF_16).toHexString(false)) assertArrayEquals("23".toCharArray().toBytes16(), "23".toBytes16() )