openHiTLS API openHiTLS 0.1.0-Alpha1

◆ CRYPT_EAL_Randbytes()

int32_t CRYPT_EAL_Randbytes ( uint8_t *  byte,
uint32_t  len 
)

Generate a random number, which is equivalent to CRYPT_EAL_RandbytesWithAdin(bytes, len, NULL, 0). This interface supports multi-thread access.

参数
byte[OUT] Used to store output random numbers, the memory is provided by the user.
len[IN] Required random number length, the length range is(0, 65536].
返回值
CRYPT_SUCCESS,ifsuccessful. For other error codes, see the crypt_errno.h file.