mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
More optblocker usage
This commit is contained in:
parent
b1f9c53875
commit
d6dd9c3ce0
@ -618,12 +618,9 @@ equal(signed char b, signed char c)
|
|||||||
static unsigned char
|
static unsigned char
|
||||||
negative(signed char b)
|
negative(signed char b)
|
||||||
{
|
{
|
||||||
/* 18446744073709551361..18446744073709551615: yes; 0..255: no */
|
const uint8_t x = (uint8_t) b; /* 0..127: no 128..255: yes */
|
||||||
uint64_t x = b;
|
|
||||||
|
|
||||||
x >>= 63; /* 1: yes; 0: no */
|
return ((x >> 5) ^ optblocker_u8) >> 2; /* 1: yes; 0: no */
|
||||||
|
|
||||||
return x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user