Function tari_wallet_ffi::private_key_create[][src]

#[no_mangle]pub unsafe extern "C" fn private_key_create(
    bytes: *mut ByteVector,
    error_out: *mut c_int
) -> *mut TariPrivateKey

-------------------------------------------------------------------------------------------- /// -------------------------------- Private Key ----------------------------------------------- /// Creates a TariPrivateKey from a ByteVector

Arguments

bytes - The pointer to a ByteVector 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 bytes is null or if there was an error creating the TariPrivateKey from bytes

Safety

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