Cryptography Reference
In-Depth Information
With the help of these and the remaining functions of Table 15-1 we can
determine the output formats in the following. First, the standard output format
represents the value of a LINT object as a hexadecimal number in a character
string, where the output fills as many lines on the screen as required by the
number of digits of the LINT object. In an additional line the number of digits of
the LINT object is displayed flush left. The following additional modes for output
of a LINT object have been implemented:
1. Base for the representation of digits
The standard base for the representation of digits of LINT objects is 16, and
for the representation of the length it is 10. This default for LINT objects can
be set for the standard output stream cout to a specified base by a call to
LINT::setf (LINT::base);
and to
LINT::setf (ostream, LINT::base);
for an arbitrary output stream. Here base can assume any one of the values
linthex, lintdec, lintoct, lintbin,
which denote the corresponding output format. A call to
LINT::setf(lintdec) , for example sets the output format to decimal
digits. The base for the representation of the length can be set with the
function
ios::setf (ios::iosbase);
with iosbase = hex , dec , oct .
2. Display of the prefix for the numerical representation
The default is for a LINT object to be displayed with a prefix indicating how
it is represented. A call to
LINT::unsetf(LINT::lintshowbase);
LINT::unsetf (ostream, LINT::lintshowbase);
changes this setting.
3. Display of hexadecimal digits in uppercase letters
The default is the display of hexadecimal digits and the display of the prefix
0x for a hexadecimal representation in lowercase letters abcdef . However,
acallto
LINT::setf (LINT::lintuppercase);
LINT::setf (ostream, LINT::lintuppercase);
changes this, so that the prefix 0X and uppercase letters ABCDEF are
displayed.
 
Search WWH ::




Custom Search