Cryptography Reference
In-Depth Information
swap the values of two CLINT objects
Function:
void fswap_l (CLINT a_l, CLINT b_l);
Syntax:
a_l , b_l (values to be exchanged)
Input:
a_l , b_l
Output:
The functions in the FLINT/C library for the input and output of numbers in a
form readable by human beings are not among the most exciting functions in this
library, yet for many applications they are unavoidable. For practical reasons a
form was selected to allow for the input and output by means of character strings,
as vectors of type char . For this the two essentially complementary functions
str2clint_l() and xclint2str_l() were developed: The first transforms a
character string with digits into a CLINT object, and the second, conversely,
transforms a CLINT object into a character string. The base of the character string's
representation is specified, with representations to bases in the range from 2 to
16 allowed.
The conversion to be carried out by the function str2clint_l() of a
representation of type CLINT into a representation in the base specified is
accomplished by means of a sequence of multiplications and additions to base B
(cf. [Knut], Section 4.4). The function registers any overflow that occurs, the use of
invalid bases, and the passing of the null pointer and returns the corresponding
error code. Any prefixes indicating the number's representation, “ 0X ,” “ 0x ,” “ 0B ,”
or “ 0b ,” are ignored.
conversion of a character string into a CLINT object
Function:
int str2clint_l (CLINT n_l, char *str, USHORT b);
Syntax:
str (pointer to a sequence of char ) base
(base of the numerical representation of the character
string, 2
Input:
base
16 )
n_1 (target CLINT object)
Output:
E_CLINT_OK if all is ok
E_CLINT_BOR if base < 2 or base > 16 ,
or if the number of digits in str is larger than base
E_CLINT_OFL if overflow
E_CLINT_NPT if in str the null pointer was passed
Return:
 
Search WWH ::




Custom Search