Type Alias secp256k1_sys::NonceFn

source ·
pub type NonceFn = Option<unsafe extern "C" fn(nonce32: *mut c_uchar, msg32: *const c_uchar, key32: *const c_uchar, algo16: *const c_uchar, data: *mut c_void, attempt: c_uint) -> c_int>;
Expand description

A nonce generation function. Ordinary users of the library never need to see this type; only if you need to control nonce generation do you need to use it. I have deliberately made this hard to do: you have to write your own wrapper around the FFI functions to use it. And it’s an unsafe type. Nonces are generated deterministically by RFC6979 by default; there should be no need to ever change this.

Aliased Type§

enum NonceFn {
    None,
    Some(unsafe extern "C" fn(_: *mut u8, _: *const u8, _: *const u8, _: *const u8, _: *mut c_void, _: u32) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut u8, _: *const u8, _: *const u8, _: *const u8, _: *mut c_void, _: u32) -> i32)

Some value of type T.