md5

MoonBit md5: provide simple md5 hash algorithm.

md5
hash
algorithm
moonbit
moon add gmlewis/md5@0.19.34
Download zip
Author
Version
0.19.34
License
Apache-2.0
Last updated
29 days ago
Downloads
2K

Dependencies

README

#gmlewis/md5

check

This is a simple md5 hash algorithm based on Go's implementation: https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/crypto/md5/md5.go which has the copyright notice:

// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.

#Status

The code has been updated to support compiler:

$ moon version --all moon 0.1.20260330 (c527f57 2026-03-30) ~/.moon/bin/moon moonc v0.8.4+4d98d95d4 (2026-03-30) ~/.moon/bin/moonc moonrun 0.1.20260330 (c527f57 2026-03-30) ~/.moon/bin/moonrun moon-pilot 0.0.1-df92511 (2026-03-30) ~/.moon/bin/moon-pilot

#
HashFunc

pub(open) trait HashFunc {
name(Self) -> String
write(Self, Byte) -> Unit
check_sum(Self) -> String
}

HashFunc represents a hash algorithm like @crc32, @md5, or @sha256.

#
Digest

type Digest

Digest represents the partial evaluation of a checksum.
impl HashFunc for Digest

#
Digest::new

fn Digest::new() -> Digest

Digest::new returns a new, reset Digest, ready to sum.

#
Digest::reset

fn Digest::reset(self : Digest) -> Unit

reset resets a digest for re-use.

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io