libcrux_sha2/
lib.rs

1#![no_std]
2
3/// The length of a SHA224 hash in bytes.
4pub const SHA224_LENGTH: usize = 28;
5
6/// The length of a SHA256 hash in bytes.
7pub const SHA256_LENGTH: usize = 32;
8
9/// The length of a SHA384 hash in bytes.
10pub const SHA384_LENGTH: usize = 48;
11
12/// The length of a SHA512 hash in bytes.
13pub const SHA512_LENGTH: usize = 64;
14
15/// The generated hacl code
16#[cfg(not(feature = "expose-hacl"))]
17mod hacl;
18
19/// The generated hacl code
20#[cfg(feature = "expose-hacl")]
21pub mod hacl;
22
23/// The implementation of our types using that hacl code
24mod impl_hacl;
25
26/// use it if we want to use hacl
27pub use impl_hacl::*;