This library allows you to compute MD5 message digests in Elm. It exposes a single function that takes any string and outputs a "fingerprint" containing 32 hexadecimal characters. More information about the MD5 algorithm can be found here.
hex : String -> String
Given a string of arbitrary length, returns a string of 32 hexadecimal characters (a-f, 0-9) representing the 128-bit MD5 message digest.
hex ""
--> "d41d8cd98f00b204e9800998ecf8427e"
hex "foobarbaz"
--> "6df23dc03f9b54cc38a0fc1483df6e21"
bytes : String -> List Basics.Int
Given a string of arbitrary length, returns a list of integers representing the hash as a series of individual bytes.
bytes "hello world"
--> [ 0x5e , 0xb6 , 0x3b , 0xbb
--> , 0xe0 , 0x1e , 0xee , 0xd0
--> , 0x93 , 0xcb , 0x22 , 0xbb
--> , 0x8f , 0x5a , 0xcd , 0xc3
--> ]