const-sha1

Crates.ioconst-sha1
lib.rsconst-sha1
version0.3.0
sourcesrc
created_at2020-06-29 14:31:57.019085
updated_at2024-01-03 11:24:29.77298
descriptionA sha1 implementation for use in const contexts
homepage
repositoryhttps://github.com/rylev/const-sha1
max_upload_size
id259401
size33,624
Ryan Levick (rylev)

documentation

https://docs.rs/const-sha1

README

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:

Commit count: 40

cargo fmt