fix 2^n check

This commit is contained in:
Infendro committed 2026-01-17 15:50:17 +01:00
1 parent a553aa6723
commit a347bd617c
1 file changed
+1 -1
@@ -11,7 +11,7 @@ open class StreamEncoding(
private val padding: Byte? = null,
) : Encoding(alphabet) {
init {
require(base % 2 == 0)
require(base and (base - 1) == 0)
}
override fun encode(bytes: ByteArray): ByteArray {