rind 0.1.1

Pure-Rust cryptography for MoQ, forked from graviola
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// Written for Graviola by Joe Birr-Pixton, 2024.
// SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT-0

use crate::low::x86_64;

pub(crate) fn sha256_compress_blocks(state: &mut [u32; 8], blocks: &[u8]) {
    if let Some(token) = x86_64::cpu::HaveSha256::check() {
        x86_64::sha256::sha256_compress_blocks_shaext(state, blocks, token)
    } else {
        x86_64::sha256::sha256_compress_blocks_avx2(state, blocks)
    }
}