A simple sha256 algorithm implemented in moonbit
No dependencies
Published modules that use this version
moon add shu-kitamura/sha256
///|fn main { let digest_bytes = @sha256.sha256(b"hello") // => Bytes (32 bytes) let digest_hex = @sha256.sha256_hexdigest(b"hello") // => String (64 hex chars)}
fn ch(x : UInt, y : UInt, z : UInt) -> UInt
fn lower_sigma0(word : UInt) -> UInt
fn lower_sigma1(word : UInt) -> UInt
fn maj(x : UInt, y : UInt, z : UInt) -> UInt
fn rtor(data : UInt, shift : Int) -> UInt
fn sha256(input : Bytes) -> Bytes
fn sha256_hexdigest(input : Bytes) -> String
fn upper_sigma0(word : UInt) -> UInt
fn upper_sigma1(word : UInt) -> UInt
Install
Powered by MoonBit
© 2026 mooncakes.io