Cryptography Reference
In-Depth Information
if (DIGITS_L (a_l) < DIGITS_L (b_l))
{
r_l = LSDPTR_L (b_l);
s_l = LSDPTR_L (a_l);
lastptr_l = MSDPTR_L (a_l);
}
else
{
r_l = LSDPTR_L (a_l);
s_l = LSDPTR_L (b_l);
lastptr_l = MSDPTR_L (b_l);
}
Now the pointer
t_l
is set to point to the first digit of the result, and the maximal
length of the result is stored in
d_l[0]
.
t_l = LSDPTR_L (d_l);
SETDIGITS_L (d_l, DIGITS_L (s_l - 1));
The actual operation runs in the following loop over the digits of the shorter
argument. The result cannot have a larger number of digits.
while (s_l <= lastptr_l)
{
*t_l++ = *r_l++ & *s_l++;
}
After the result is copied to
c_l
, where any leading zeros are expunged, the
function is ended.
cpy_l (c_l, d_l);
}
Function:
operating by bitwise OR
void or_l (CLINT a_l, CLINT b_l, CLINT c_l);
Syntax:
a_l
,
b_l
(arguments to be operated on)
Input:
c_l
(value of the OR operation)
Output: