Function nrfxlib_sys::ocrypto_ecdh_p256_secret_key_check
source · pub unsafe extern "C" fn ocrypto_ecdh_p256_secret_key_check(
sk: *const u8
) -> c_int
Expand description
ECDH P-256 secret key check.
sk
- Secret key to check.
Returns 0 If * sk
- is a valid secret key.
Returns -1 Otherwise.
@remark To generate a valid secret key use the following code pattern: @code{.c} do get_random(sk); while (ocrypto_ecdh_p256_secret_key_check(sk)); @endcode