Modules

md5

moduleSource

Available on macOS, Linux, Windows, Wasm

#import "md5";

MD5 digests as hex strings: md5 for checksums and legacy formats.

Example↗
digest := md5("abc");
defer free(digest);
assert(digest == "900150983cd24fb0d6963f7d28e17f72");

Procedures#

(input: string) -> string

Returns the MD5 digest of input as 32 lowercase hex characters, in a string the caller frees. MD5 is broken as a security measure; use it for checksums and legacy formats only.

digest := md5("abc");
defer free(digest);
assert(digest == "900150983cd24fb0d6963f7d28e17f72");
↗