Sign in

    sha1

    MoonBit sha1: provide simple sha1 hash algorithm.

    sha1
    hash
    algorithm
    moonbit
    Download zip
    Author
    Version
    0.12.17
    License
    Apache-2.0
    Last updated
    yesterday
    Downloads
    241

    Dependencies

    #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.20261016 (1af328f 2026-10-16) ~/.moon/bin/moon moonc v0.10.16+b1a0e846e (2026-10-16) ~/.moon/bin/moonc moonrun 0.1.20261016 (1af328f 2026-10-16) ~/.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.

    Digest::write

    fn Digest::write(self : Digest, buf :
    Slice
    [Byte]) -> (Int,
    IOError
    ?)

    Digest::write_byte

    fn Digest::write_byte(self : Digest, b : Byte) ->
    IOError
    ?

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io