Crates.io | const-sha1 |
lib.rs | const-sha1 |
version | 0.3.0 |
source | src |
created_at | 2020-06-29 14:31:57.019085 |
updated_at | 2024-01-03 11:24:29.77298 |
description | A sha1 implementation for use in const contexts |
homepage | |
repository | https://github.com/rylev/const-sha1 |
max_upload_size | |
id | 259401 |
size | 33,624 |
A sha1 implementation useable in const contexts.
const fn signature() -> [u32; 5] {
const_sha1::sha1(stringify!(MyType).as_bytes()).data
}
This crate requires Rust 1.46.0 or newer due to the use of some const expression features.
const-sha1 = { version = "0.2.0", default-features = false }
This code is largely inspired by the following repos: