rylev / const-sha1

A sha1 implementation useable in const contexts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

About

A sha1 implementation useable in const contexts

License:Apache License 2.0


Languages

Language:Rust 100.0%