Debian Codegraph @

debian/rust-vendor/sha2/src/sha256/riscv_zknh.rs

raw
1 #[cfg(not(any(target_arch = "riscv32", target_arch = "riscv64")))]
2 compile_error!("riscv-zknh backend can be used only on riscv32 and riscv64 target arches");
3
4 mod utils;
5
6 #[cfg(target_arch = "riscv32")]
7 use core::arch::riscv32::{sha256sig0, sha256sig1, sha256sum0, sha256sum1};
8 #[cfg(target_arch = "riscv64")]
9 use core::arch::riscv64::{sha256sig0, sha256sig1, sha256sum0, sha256sum1};
10
11 cfg_if::cfg_if! {
12 if #[cfg(sha2_backend_riscv_zknh = "compact")] {
13 mod compact;
14 pub(super) use compact::compress;
15 } else {
16 mod unroll;
17 pub(super) use unroll::compress;
18 }
19 }