Cryptography Reference
In-Depth Information
If there are to be conversions between byte vectors and CLINT objects, then
the pair of functions byte2clint_l() and clint2byte_l() can be employed
(cf. [IEEE], 5.5.1).
It is assumed that the byte vectors embody a numerical representation to
base 256 with values increasing from right to left. For the implementation of these
functions the reader is referred to the file flint.c . We give here only the function
headers.
conversion of a byte vector into a CLINT object
Function:
int byte2clint_l (CLINT n_l, UCHAR *bytestr, int len);
Syntax:
bytestr (pointer to a sequence of UCHAR )
len (length of the byte vector)
Input:
Output:
n_l (target CLINT object)
E_CLINT_OK if all ok
E_CLINT_OFL if overflow
E_CLINT_NPT if in bytestr the null pointer was passed
Return:
conversion of a CLINT object into a byte vector
Function:
Syntax:
UCHAR * clint2byte_l (CLINT n_l, int *len);
n_l ( CLINT object to be converted)
Input:
len (length of the generated byte vector)
Output:
Return:
pointer to the calculated byte vector
NULL ,ifin len the null pointer was passed
Finally, for the transformation of unsigned values into the CLINT numerical
format the two functions u2clint_l() and ul2clint_l() can be used. The function
u2clint_l() converts USHORT arguments, and the function ul2clint_l() converts
ULONG arguments, into the CLINT numerical format. The function ul2clint_l()
will be described in the following as an example.
conversion of a value of type ULONG into a CLINT object
Function:
void ul2clint_l (CLINT num_l, ULONG ul);
Syntax:
ul (value to be converted)
Input:
num_l (target CLINT object)
Output:
 
Search WWH ::




Custom Search