Consistent hashing for Scala.