sha1

MoonBit sha1: provide simple sha1 hash algorithm.

sha1
hash
algorithm
moonbit
moon add gmlewis/sha1@0.12.11
Download zip
Author
Version
0.12.11
License
Apache-2.0
Last updated
8 days ago
Downloads
197

Dependencies

README

#gmlewis/sha1

check

This is a simple sha1 hash algorithm based on Go's implementation: https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/crypto/sha1/sha1.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.20260803 (c19f78e 2026-08-03) ~/.moon/bin/moon moonc v0.10.6+80dc50f24 (2026-08-04) ~/.moon/bin/moonc moonrun 0.1.20260803 (c19f78e 2026-08-03) ~/.moon/bin/moonrun

#
Digest

type Digest

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

#
Digest::check_sum

fn Digest::check_sum(self : Digest) -> String

check_sum returns the final sha1sum as a hex string.

#
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.

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io