Expand description
Hardware-accelerated hashing with SIMD support
This module provides a pluggable hash algorithm system with:
- Runtime CPU feature detection
- SIMD-optimized implementations (AVX2 for x86_64, NEON for ARM)
- Fallback to standard implementations
- Modern hash algorithms (BLAKE3)
§Example
use ipfrs_core::hash::{HashEngine, Sha256Engine, Sha512Engine, Blake3Engine};
let data = b"hello world";
// SHA2-256 (32 bytes)
let sha256 = Sha256Engine::new();
let hash256 = sha256.digest(data);
// SHA2-512 (64 bytes) - stronger security
let sha512 = Sha512Engine::new();
let hash512 = sha512.digest(data);
// BLAKE3 is fastest with built-in SIMD
let blake3 = Blake3Engine::new();
let blake3_hash = blake3.digest(data);Structs§
- Blake2b256
Engine - BLAKE2b-256 hash engine
- Blake2b512
Engine - BLAKE2b-512 hash engine
- Blake2s256
Engine - BLAKE2s-256 hash engine
- Blake3
Engine - BLAKE3 hash engine with built-in SIMD support
- CpuFeatures
- CPU feature detection result
- Hash
Registry - Hash algorithm registry for pluggable hash support
- Sha3_
256Engine - SHA3-256 hash engine
- Sha3_
512Engine - SHA3-512 hash engine
- Sha256
Engine - SHA2-256 hash engine with SIMD support
- Sha512
Engine - SHA-512 hash engine with SIMD support
Traits§
- Hash
Engine - Trait for hardware-accelerated hash computation
Functions§
- global_
hash_ registry - Get the global hash registry