8#ifndef BOTAN_WORD_ROTATE_H_
9#define BOTAN_WORD_ROTATE_H_
11#include <botan/compiler.h>
12#include <botan/types.h>
22template <
size_t ROT, std::
unsigned_
integral T>
24 requires(ROT > 0 && ROT < 8 *
sizeof(T))
26 return static_cast<T
>((input << ROT) | (input >> (8 *
sizeof(T) - ROT)));
34template <
size_t ROT, std::
unsigned_
integral T>
36 requires(ROT > 0 && ROT < 8 *
sizeof(T))
38 return static_cast<T
>((input >> ROT) | (input << (8 *
sizeof(T) - ROT)));
44template <
size_t R1,
size_t R2,
size_t S, std::
unsigned_
integral T>
52template <
size_t R1,
size_t R2,
size_t R3, std::
unsigned_
integral T>
63template <std::
unsigned_
integral T>
65 return rot ?
static_cast<T
>((input << rot) | (input >> (
sizeof(T) * 8 - rot))) : input;
74template <std::
unsigned_
integral T>
76 return rot ?
static_cast<T
>((input >> rot) | (input << (
sizeof(T) * 8 - rot))) : input;
#define BOTAN_FORCE_INLINE
BOTAN_FORCE_INLINE constexpr T rotr(T input)
BOTAN_FORCE_INLINE constexpr T rho(T x)
BOTAN_FORCE_INLINE constexpr T rotl(T input)
BOTAN_FORCE_INLINE constexpr T rotr_var(T input, size_t rot)
BOTAN_FORCE_INLINE constexpr T sigma(T x)
BOTAN_FORCE_INLINE constexpr T rotl_var(T input, size_t rot)