MD5 - js function for hashing messages with MD5
js function for hashing messages with MD5.
$ sbt clean publish-local
Before running the tests the first time, you must ensure the npm packages are installed:
$ npm install
Then you can run the tests:
$ sbt test
Convert a string to MD5:
import io.scalajs.npm.md5._
MD5("Hello Wold") //=> 7e1c79bda939ad9f46a382a56df147e1
Convert a buffer to MD5:
import io.scalajs.nodejs.buffer.Buffer
import io.scalajs.npm.md5._
val buffer = Buffer.from("Hello Wold")
MD5(buffer) //=> 7e1c79bda939ad9f46a382a56df147e1
To add the MD5
binding to your project, add the following to your build.sbt:
libraryDependencies += "io.scalajs.npm" %%% "md5" % "0.5.0"
Optionally, you may add the Sonatype Repository resolver:
resolvers += Resolver.sonatypeRepo("releases")