/* * Word Rotation Operations * (C) 1999-2008 Jack Lloyd * * Distributed under the terms of the Botan license */ #ifndef BOTAN_WORD_ROTATE_H__ #define BOTAN_WORD_ROTATE_H__ #include namespace Botan { /* * Word Rotation Functions */ template inline T rotate_left(T input, size_t rot) { return static_cast((input << rot) | (input >> (8*sizeof(T)-rot)));; } template inline T rotate_right(T input, size_t rot) { return static_cast((input >> rot) | (input << (8*sizeof(T)-rot))); } } #endif