rotate.h File Reference

Bit operations. More...

#include <stdint.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
static uint32_t rol32 (uint32_t data, unsigned int rotation)
static uint32_t ror32 (uint32_t data, unsigned int rotation)
static uint64_t rol64 (uint64_t data, unsigned int rotation)
static uint64_t ror64 (uint64_t data, unsigned int rotation)


Detailed Description

Bit operations.

Definition in file rotate.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

static uint32_t rol32 ( uint32_t  data,
unsigned int  rotation 
) [inline, static]

Definition at line 13 of file rotate.h.

00013                                                                       {
00014         return ( ( data << rotation ) | ( data >> ( 32 - rotation ) ) );
00015 }

static uint32_t ror32 ( uint32_t  data,
unsigned int  rotation 
) [inline, static]

Definition at line 17 of file rotate.h.

00017                                                                       {
00018         return ( ( data >> rotation ) | ( data << ( 32 - rotation ) ) );
00019 }

static uint64_t rol64 ( uint64_t  data,
unsigned int  rotation 
) [inline, static]

Definition at line 21 of file rotate.h.

00021                                                                       {
00022         return ( ( data << rotation ) | ( data >> ( 64 - rotation ) ) );
00023 }

static uint64_t ror64 ( uint64_t  data,
unsigned int  rotation 
) [inline, static]

Definition at line 25 of file rotate.h.

00025                                                                       {
00026         return ( ( data >> rotation ) | ( data << ( 64 - rotation ) ) );
00027 }


Generated on Tue Apr 6 20:01:52 2010 for gPXE by  doxygen 1.5.7.1