Skip to content

scalajs-io/md5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MD5 API for Scala.js

MD5 - js function for hashing messages with MD5

Description

js function for hashing messages with MD5.

Build Dependencies

Build/publish the SDK locally

 $ sbt clean publish-local

Running the tests

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

Examples

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

Artifacts and Resolvers

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") 

Releases

No releases published

Packages

No packages published

Languages