[−][src]Function eosio_cdt_sys::assert_sha512
pub unsafe extern "C" fn assert_sha512(
data: *const c_char,
length: u32,
hash: *const capi_checksum512
)
Tests if the sha512 hash generated from data matches the provided checksum.
@note This method is optimized to a NO-OP when in fast evaluation mode.
@param data - Data you want to hash
@param length - Data length
@param hash - capi_checksum512*
hash to compare to
@pre assert512 hash of data
equals provided hash
parameter.
@post Executes next statement. If was not true
, hard return.
Example:
@code checksum hash; char data; uint32_t length; assert_sha512( data, length, hash ) //If the sha512 hash generated from data does not equal provided hash, anything below will never fire. eosio::print("sha512 hash generated from data equals provided hash"); @endcode