blob: c608eb06e570e201fcd3c0ce4ac3276e7b247e7e (
plain) (
tree)
|
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
uint8_t
libhashsum_reverse_byte__(uint8_t x)
{
x = (uint8_t)(((x & 0xAAU) >> 1) | ((x << 1) & 0xAAU));
x = (uint8_t)(((x & 0xCCU) >> 2) | ((x << 2) & 0xCCU));
x = (uint8_t)(((x & 0xF0U) >> 4) | ((x << 4) & 0xF0U));
return x;
}
|