openHiTLS API openHiTLS 0.1.0-Alpha1

◆ getNonce

int32_t(* getNonce) (void *ctx, CRYPT_Data *nonce, uint32_t strength, CRYPT_Range *lenRange)

Obtain the random number. This API is not need to registered. For registration, the output data must meet requirements such as the length. The HiTLS does not check the entropy source, but will implement if provide the function.

参数
ctx[IN] Context used by the caller
nonce[OUT] Obtained random number. The length of the random number must be lenRange->min <= len <= lenRange->max.
strength[IN]: Random number strength
lenRange[IN] Random number length range.
返回值
0indicates success, and other values indicate failure.