

#include <twl/os/common/systemCall.h>
int SVC_Random( void* dest_ptr,
unsigned int dest_len,
const void* src_ptr,
unsigned int src_len );
| dest_ptr | Pointer to the output data. |
| dest_len | Length of the output data. |
| src_ptr | Pointer to the input data. |
| src_len | Length of the input data. |
Returns TRUE if the operation completed normally, or if dest_ptr is NULL. Returns FALSE otherwise.
Gets a random number using SHA-1.
In practice, the SHA-1 process is used to churn the input data arrays provided in src_ptr and src_len, and the result is stored the output data areas dest_ptr and dest_len. As a result, the same result can be achieved if the same data is provided as input.
Because SHA-1 is used, the input has a precision of 64 bytes, and the output has a precision of 20 bytes. The fact that the output has a precision of 20 bytes essentially means that when some data array is output, if the leading 20 bytes of that output is the same as that of the output of a separate operation, the rest of the data will be the same as well.
2007/10/19 Initial version.
CONFIDENTIAL