Debian Codegraph @

.cargo/vendor/sha1/src/compress/aarch64.rs

raw
1 //! SHA-1 `aarch64` backend.
2
3 // Per rustc target feature docs for `aarch64-unknown-linux-gnu` and
4 // `aarch64-apple-darwin` platforms, the `sha2` target feature enables
5 // SHA-1 as well:
6 //
7 // > Enable SHA1 and SHA256 support.
8 cpufeatures::new!(sha1_hwcap, "sha2");
9
10 pub fn compress(state: &mut [u32; 5], blocks: &[[u8; 64]]) {
11 // TODO: Replace with https://github.com/rust-lang/rfcs/pull/2725
12 // after stabilization
13 if sha1_hwcap::get() {
14 sha1_asm::compress(state, blocks);
15 } else {
16 super::soft::compress(state, blocks);
17 }
18 }