The comments were spot on, the library only supports a maximum of 54 bytes. This test confirms it. EQUAL=false
begins at 54 bytes. Thank you to the helpers in the comments.
@Test
fun test() {
for (n in 100 downTo 0) {
val secureRandom = SecureRandom()
val bytes = ByteArray(n)
secureRandom.nextBytes(bytes)
val password = Base64.getUrlEncoder().withoutPadding().encodeToString(bytes)
val passwordHash = BCrypt.hashpw(password, BCrypt.gensalt())
val modified = password.dropLast(1)
val equal = BCrypt.checkpw(password, passwordHash) && BCrypt.checkpw(modified, passwordHash)
println("BYTES=$n EQUAL=$equal")
}
}