Skip to main content

hardware_accelerated

Function hardware_accelerated 

Source
pub fn hardware_accelerated() -> bool
Expand description

Returns true if this crate can use AES hardware acceleration on the current machine.

This is a runtime check performed on the machine where the code is executed.

if aes::hardware_accelerated() {
    println!("AES hardware acceleration is available");
} else {
    println!("WARNING: using software fallback for AES");
}