mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-16 08:27:01 +03:00
update cspot
This commit is contained in:
@@ -9,20 +9,16 @@ using std::size_t;
|
||||
|
||||
static inline uint32_t rotl(uint32_t n, unsigned int c)
|
||||
{
|
||||
const unsigned int mask = (CHAR_BIT * sizeof(n) - 1); // assumes width is a power of 2.
|
||||
|
||||
// assert ( (c<=mask) &&"rotate by type width or more");
|
||||
c &= mask;
|
||||
return (n << c) | (n >> ((-c) & mask));
|
||||
c &= sizeof(n) * CHAR_BIT - 1;
|
||||
return (n << c) | (n >> (sizeof(n)*CHAR_BIT-c));
|
||||
}
|
||||
|
||||
static inline uint32_t rotr(uint32_t n, unsigned int c)
|
||||
{
|
||||
const unsigned int mask = (CHAR_BIT * sizeof(n) - 1);
|
||||
|
||||
// assert ( (c<=mask) &&"rotate by type width or more");
|
||||
c &= mask;
|
||||
return (n >> c) | (n << ((-c) & mask));
|
||||
c &= sizeof(n) * CHAR_BIT - 1;
|
||||
return (n >> c) | (n << (sizeof(n)*CHAR_BIT-c));
|
||||
}
|
||||
|
||||
uint32_t Shannon::sbox1(uint32_t w)
|
||||
|
||||
Reference in New Issue
Block a user