Cryptography Reference
In-Depth Information
{
N[i++] = (char) ntable[*LSDPTR_L (r_l) & 0xff];
}
}
while (GTZ_L (u_l));
if (showbase)
{
switch (base)
{
case 2:
N[i++] = 'b';
N[i++] = '0';
break;
case 8:
N[i++] = '0';
break;
case 16:
N[i++] = 'x';
N[i++] = '0';
break;
}
}
N[i] = '0';
return strrev_l (N);
}
For reasons of compatibility with the function
clint2str_l()
in the first
edition of this topic,
clint2str_l(n_l, base)
was defined as a macro that calls
the function
xclint2str(n_l, base, 0)
.
Furthermore, macros
HEXSTR_L()
,
DECSTR_L()
,
OCTSTR_L()
, and
BINSTR_L()
were created, which create, from a passed
CLINT
object as argument, a character
string without prefix with the numerical representation specified by the macro
name and thus eliminate the base of the representation as an argument (see
Appendix C).
As standard form for the output of
CLINT
values we have available the macro
DISP_L()
, which processes a pointer to a character string and a
CLINT
object as
arguments. The character string contains, according to the purpose to which it
will be put, information about the following
CLINT
value to be output, such as “
The
product of a_l and b_l has the value
...
.” The output of the
CLINT
value is in
hexadecimal, that is, to base 16. Additionally,
DISP_L()
outputs in a new line the
number of significant binary digits (that is, without leading zeros) of the indicated
CLINT
object (cf. Appendix C).