Crate const_sha1

Source
Expand description

A const evaluated sha1 function.

§Use

const fn signature() -> const_sha1::Digest {
    const_sha1::sha1(stringify!(MyType).as_bytes())
}

Structs§

ConstSlice
A buffer of a constant size suitable for use in const contexts as a temporary replacement for slices.
Digest
A sha1 digest

Constants§

BUFFER_SIZE
The size of the ConstSlice.

Functions§

sha1
A const evaluated sha1 function.
sha1_from_const_slice
A const evaluated sha1 function. The function differs from sha1 in that it uses a ConstSlice which allows for resizing a slice at const evaluation time which is not permitted with built-in slices.