Cryptography Reference
In-Depth Information
UCHAR
bRandBBS_l (STATEBBS *rstate)
{
int i;
UCHAR r = SwitchRandBBS_l (rstate);
for (i = 1; i < (sizeof (UCHAR) << 3); i++)
{
r = (r << 1) + SwitchRandBBS_l (rstate);
}
return r;
}
For completeness, we should mention the functions sRandBBS_l() and
lRandBBS_l() , which generate random numbers of types USHORT and ULONG .
We still lack the function RandBBS_l , which generates random numbers r_l
with exactly l binary digits r_l in the interval 2 l 1
r_l 2 l
1 .Since
this corresponds to a great extent to the function rand_l() ,weshallomitan
extensive description, instead presenting only the function header. Of course,
these functions are contained in the FLINT/C package. To delete state buffers, the
function PurgeRandBBS_l() is available.
generation of a random number of type CLINT
Function:
int
RandBBS_l (CLINT r_l, STATEBBS *rstate, int l);
Syntax:
rstate (internal state of the pseudorandom
number generator)
l (number of binary digits of the number to be generated
Input:
r_l (random number in the interval 2 l 1
r_l 2 l
1)
Ouput:
E_CLINT_OK if all OK
E_CLINT_RIN if generator is not initialized
Return:
 
Search WWH ::




Custom Search