This repository offers a WebAssembly (WASM) module implementing primitives for computing MD5 digests.
The module contains a set of routines designed to be leveraged together in a wide number of settings and applications -- instead of providing a single routine which could be an impediment to use with some types of data or framework.
The module will have been "written in WebAssembly" -- using the [canonical] WAT text format, with or without use of pre-compiler as well. Generally this is for assessing optimization avenues and to retain ability to easily introspect the implementation, as compiling from a sufficiently different language may or may not generate "readable" WASM/WAT code. That said, multiple implementations may be temporally contained within the repository, and possibilities of generated WAT code (or WASM code generated by a compiler indeed) are not excluded.
Releases containing the built module may be made available through the "Releases" feature, eventually, for convenience.
There is the MD5.js module that uses this module to facilitate MD5 computation with e.g. a Web browser.
The module that you can load for immediate use by a WASM virtual machine (e.g. in your Web browser), is built from source code in this repository. This building of the WASM module is encapsulated by the provided makefile
. Change to the directory where you want the module file built and use GNU make
like so:
make -f /path/to/the/makefile
To build the module you will need the following programs available at the build site:
wat2wasm
; here tested with v.1.0.26
from the WebAssembly Binary Toolkit (WABT)m4
; here tested with v.1.4.18
from the GNU M4 preprocessor