Function tari_wallet_ffi::private_key_from_hex[][src]

#[no_mangle]pub unsafe extern "C" fn private_key_from_hex(
    key: *const c_char,
    error_out: *mut c_int
) -> *mut TariPrivateKey

Creates a TariPrivateKey from a char array

Arguments

key - The pointer to a char array which is hex encoded error_out - Pointer to an int which will be modified to an error code should one occur, may not be null. Functions as an out parameter.

Returns

*mut TariPrivateKey - Returns a pointer to a TariPublicKey. Note that it returns ptr::null_mut() if key is null or if there was an error creating the TariPrivateKey from key

Safety

The private_key_destroy method must be called when finished with a TariPrivateKey to prevent a memory leak