In Development Package, API may change between versions.

import "github.com/egdaemon/eg/runtime/x/wasi/egmd5x"

func Digest

func Digest[T string | []byte](b T) hash.Hash

digest the provided contents and return the resulting hash. if an error occurs during hashing then a nil value is returned.

func FormatHex

func FormatHex(m hash.Hash) string

format md5 hash to a hex encoded string

func FormatString

func FormatString(m hash.Hash) string

format md5 hash to a uuid encoded string

func String

func String(s string) string

String to md5 uuid encoded string, shorthand for egdmdx.FormatString(egmd5x.Digest(v))