const-sha1 0.3.0

A sha1 implementation for use in const contexts
Documentation
  • Coverage
  • 100%
    15 out of 15 items documented3 out of 14 items with examples
  • Size
  • Source code size: 33.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.85 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • rylev/const-sha1
    88 11 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • rylev

crates.io docs.rs Build and Test

const-sha1

A sha1 implementation useable in const contexts.

Use

const fn signature() -> [u32; 5] {
    const_sha1::sha1(stringify!(MyType).as_bytes()).data
}

Minimum Supported Rust Version (MSRV)

This crate requires Rust 1.46.0 or newer due to the use of some const expression features.

No-std

const-sha1 = { version = "0.2.0", default-features = false }

Attribution

This code is largely inspired by the following repos: