# Scala Guide
# Dependency
Assuming you use SBT, add the following library dependency:
libraryDependencies += "de.bitmarck.bms" %% "base32check-scala" % "0.0.2"
This library supports Scala 2.10, 2.11, 2.12 and 2.13.
# Codec
import de.bitmarck.bms.base32.Base32
val bytes = "Hello world!".getBytes
val base32 = Base32.encode(bytes)
val copy = Base32.decode(base32)
assert(copy == bytes.toSeq)
# Checksum
import de.bitmarck.bms.base32.Base32Check1
val string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
val checksum = Base32Check1.compute(string)
assert(Base32Check1.validate(string + checksum))