Line | Count | Source |
1 | cfg_if::cfg_if! { | |
2 | if #[cfg(sha2_backend_soft = "compact")] { | |
3 | mod compact; | |
4 | pub(super) use compact::compress; | |
5 | } else { | |
6 | mod unroll; | |
7 | pub(super) use unroll::compress; | |
8 | } | |
9 | } | |
10 | ||
11 | #[inline(always)] | |
12 | 0 | fn to_u64s(block: &[u8; 128]) -> [u64; 16] { |
13 | 0 | core::array::from_fn(|i| { |
14 | 0 | let chunk = block[8 * i..][..8].try_into().unwrap(); |
15 | 0 | u64::from_be_bytes(chunk) |
16 | 0 | }) |
17 | 0 | } |