From 521549d90076b0745eef85e5ab37047658b73b96 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 30 Sep 2008 01:20:04 +0100 Subject: [crypto] Rename to --- src/include/gpxe/bitops.h | 27 --------------------------- src/include/gpxe/rotate.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 src/include/gpxe/bitops.h create mode 100644 src/include/gpxe/rotate.h (limited to 'src/include') diff --git a/src/include/gpxe/bitops.h b/src/include/gpxe/bitops.h deleted file mode 100644 index f95af7d3f..000000000 --- a/src/include/gpxe/bitops.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _GPXE_BITOPS_H -#define _GPXE_BITOPS_H - -/** @file - * - * Bit operations - */ - -#include - -static inline uint32_t rol32 ( uint32_t data, unsigned int rotation ) { - return ( ( data << rotation ) | ( data >> ( 32 - rotation ) ) ); -} - -static inline uint32_t ror32 ( uint32_t data, unsigned int rotation ) { - return ( ( data >> rotation ) | ( data << ( 32 - rotation ) ) ); -} - -static inline uint64_t rol64 ( uint64_t data, unsigned int rotation ) { - return ( ( data << rotation ) | ( data >> ( 64 - rotation ) ) ); -} - -static inline uint64_t ror64 ( uint64_t data, unsigned int rotation ) { - return ( ( data >> rotation ) | ( data << ( 64 - rotation ) ) ); -} - -#endif /* _GPXE_BITOPS_H */ diff --git a/src/include/gpxe/rotate.h b/src/include/gpxe/rotate.h new file mode 100644 index 000000000..42ec7196f --- /dev/null +++ b/src/include/gpxe/rotate.h @@ -0,0 +1,27 @@ +#ifndef _GPXE_ROTATE_H +#define _GPXE_ROTATE_H + +/** @file + * + * Bit operations + */ + +#include + +static inline uint32_t rol32 ( uint32_t data, unsigned int rotation ) { + return ( ( data << rotation ) | ( data >> ( 32 - rotation ) ) ); +} + +static inline uint32_t ror32 ( uint32_t data, unsigned int rotation ) { + return ( ( data >> rotation ) | ( data << ( 32 - rotation ) ) ); +} + +static inline uint64_t rol64 ( uint64_t data, unsigned int rotation ) { + return ( ( data << rotation ) | ( data >> ( 64 - rotation ) ) ); +} + +static inline uint64_t ror64 ( uint64_t data, unsigned int rotation ) { + return ( ( data >> rotation ) | ( data << ( 64 - rotation ) ) ); +} + +#endif /* _GPXE_ROTATE_H */ -- cgit v1.2.3-55-g7522