rol.hHeader
This file provides a mechanism for selecting between enhanced and default implementations of the Rotate Left (ROL) operation. More...
Detailed Description
The rol.h
file is designed to include the appropriate header file for the Rotate Left (ROL) operation, based on the configuration specified at compile time. The ROL operation is a common bitwise operation used in various cryptographic algorithms, encoding schemes, and performance optimizations.
Key Features:
Conditional Inclusion : The file conditionally includes either the enhanced or default implementation of the ROL operation based on the
ANTISPY_USE_ENHANCED_ROL
macro.Flexibility : Allows for easy switching between different implementations of the ROL operation, which can be useful for optimizing performance or security based on the application's needs.
Configuration:
The selection between the enhanced and default ROL implementation is controlled by the ANTISPY_USE_ENHANCED_ROL
macro.
If
ANTISPY_USE_ENHANCED_ROL
is defined, the enhanced implementation located inenhanced/enhanced_rol.h
is included.If
ANTISPY_USE_ENHANCED_ROL
is not defined, the default implementation located indefault/default_rol.h
is included.
This design allows developers to easily configure their build to use a specific version of the ROL operation, depending on their performance or security requirements.
Usage Example:
// Depending on the value of the ANTISPY_USE_ENHANCED_ROL macro, the appropriate ROL implementation is included.
int
In this example, the rol.h
file ensures that the correct ROL implementation is included, and the rol
function can then be used to perform a rotate-left operation on a 32-bit integer.