dcrypt_internal/lib.rs
1//! Internal utility functions for the DCRYPT library
2//!
3//! This crate provides internal utilities and helpers that are used by
4//! other DCRYPT crates but are not part of the public API.
5
6#![cfg_attr(not(feature = "std"), no_std)]
7
8pub mod constant_time;
9pub mod endian;
10pub mod zeroing;
11
12pub use constant_time::*;
13pub use endian::*;
14pub use zeroing::*;
15
16#[cfg(feature = "simd")]
17pub mod simd {
18 //! SIMD utility functions
19
20 /// Check if SIMD is available
21 pub fn is_available() -> bool {
22 #[cfg(target_feature = "sse2")]
23 {
24 true
25 }
26
27 #[cfg(not(target_feature = "sse2"))]
28 {
29 false
30 }
31 }
32}