This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.1 1.1.0
Quickly compute MD5 message digests in pure Elm
version 1.0.0
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.0
Committed At 2018-07-25 09:44:54 UTC
zwilias/elm-utf-tools 1.0.1 <= v < 2.0.0 1.0.1
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1




Build Status

Compute MD5 message digests in Elm.

This is a maintained fork of sanichi/elm-md5 focusing on performance.

Quick Start

This library exposes just one function, hex, which takes a String input and returns the 128-bit MD5 digest as a String of 32 hexadecimal characters.

MD5.hex ""          == "d41d8cd98f00b204e9800998ecf8427e"
MD5.hex "foobarbaz" == "6df23dc03f9b54cc38a0fc1483df6e21"

Unlike the JavaScript function from which this implementation has been ported, CRLF pairs in the input are not automatically replaced with LFs prior to computing the digest. If you want that behaviour, adjust the input before evaluating the function. For example:

myHex : String -> String
myHex input =
        myInput =
            Regex.replace Regex.All (Regex.regex "\x0D\n") (\_ -> "\n") input
        MD5.hex myInput


Licensed under BSD-3. See LICENSE file. (c) 2016-2018 Mark Orr, 2018-present TruQu