Function gnunet_sys::GNUNET_IDENTITY_signature_verify_ [−][src]
pub unsafe extern "C" fn GNUNET_IDENTITY_signature_verify_(
purpose: u32,
validate: *const GNUNET_CRYPTO_EccSignaturePurpose,
sig: *const GNUNET_IDENTITY_Signature,
pub_: *const GNUNET_IDENTITY_PublicKey
) -> c_int
@brief Verify a given signature.
The @a validate data is the beginning of the data of which the signature
is to be verified. The size
field in @a validate must correctly indicate
the number of bytes of the data structure, including its header. If @a
purpose does not match the purpose given in @a validate (the latter must be
in big endian), signature verification fails. If possible,
use #GNUNET_IDENTITY_signature_verify() instead of this function (only if @a validate
is not fixed-size, you must use this function directly).
@param purpose what is the purpose that the signature should have? @param validate block to validate (size, purpose, data) @param sig signature that is being validated @param pub public key of the signer @returns #GNUNET_OK if ok, #GNUNET_SYSERR if invalid