Add the following to your sbt build (Scala 2.11.x, 2.12.x, 2.13.x, 3.0.x):
val version = "..."
libraryDependencies += "com.github.j5ik2o" %% "base64scala" % version
resolvers += "Sonatype OSS Snapshot Repository" at "https://oss.sonatype.org/content/repositories/snapshots/"
val version = "..."
libraryDependencies += "com.github.j5ik2o" %% "base64scala" % version
- Encode
val string = "ABC"
val base64Value: Base64String = Base64StringFactory().encode(string)
- Decode
val original = base64Value.decode // ABC