AnsweredAssumed Answered

STM32F4Cube: PolarSSL client Strange && in RandVal()

Question asked by bauer.jack.001 on Feb 27, 2015
Dear all,

In Cube version of STM32F4, there is a strange code.
In PolarSSL/SSL_Client/Src/main.c => RandVal()

Is there a reason to use "&&" instead of "&" in the following line:
*(output + offset) = HAL_RNG_GetRandomNumber(&RngHandle) && 0xFFFFFF00;
I suppose the developper made a mistake.

The second question is: why do we have to zero out the 8-bit LSB of the RNG value ?


Outcomes