24#include "exceptions.h"
35#define cx_rotl(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
36#define cx_rotr(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
37#define cx_shr(x, n) ((x) >> (n))
39#define htole32(value) ((uint32_t) (value))
47#ifdef ARCH_LITTLE_ENDIAN
48#define _64BITS(h, l) \
53#define _64BITS(h, l) \
62#define ADD64(x, y) cx_add_64(&(x), &(y))
63#define ASSIGN64(r, x) \
77#define _64BITS(h, l) (h##ULL << 32) | (l##ULL)
81#define cx_rotr64(x, n) (((x) >> (n)) | ((x) << ((64) - (n))))
83#define cx_rotl64(x, n) (((x) << (n)) | ((x) >> ((64) - (n))))
85#define cx_shr64(x, n) ((x) >> (n))
void cx_swap_buffer64(uint64bits_t *v, int len)
void cx_shr64(uint64bits_t *x, unsigned char n)
void cx_rotr64(uint64bits_t *x, unsigned char n)
uint32_t cx_swap_uint32(uint32_t v)
uint8_t cx_constant_time_eq(const uint8_t *buf1, uint8_t *buf2, size_t len)
void cx_swap_uint64(uint64bits_t *v)
void cx_memxor(uint8_t *buf1, const uint8_t *buf2, size_t len)
void cx_swap_buffer32(uint32_t *v, size_t len)
void cx_add_64(uint64bits_t *a, uint64bits_t *b)
64-bit types, native or by-hands, depending on target and/or compiler support.