[−][src]Function eosio_cdt_sys::assert_recover_key
pub unsafe extern "C" fn assert_recover_key(
digest: *const capi_checksum256,
sig: *const c_char,
siglen: usize,
pub_: *const c_char,
publen: usize
)
Tests a given public key with the generated key from digest and the signature.
@param digest - What the key will be generated from @param sig - Signature @param siglen - Signature length @param pub - Public key @param publen - Public key length
@pre assert recovery key of pub
equals the key generated from the digest
parameter
@post Executes next statement. If was not true
, hard return.
Example:
@code checksum digest; char sig; size_t siglen; char pub; size_t publen; assert_recover_key( digest, sig, siglen, pub, publen ) // If the given public key does not match with the generated key from digest and the signature, anything below will never fire. eosio::print("pub key matches the pub key generated from digest"); @endcode