Function gnunet_sys::GNUNET_IDENTITY_sign_[][src]

pub unsafe extern "C" fn GNUNET_IDENTITY_sign_(
    priv_: *const GNUNET_IDENTITY_PrivateKey,
    purpose: *const GNUNET_CRYPTO_EccSignaturePurpose,
    sig: *mut GNUNET_IDENTITY_Signature
) -> c_int

@brief Sign a given block.

The @a purpose data is the beginning of the data of which the signature is to be created. The size field in @a purpose must correctly indicate the number of bytes of the data structure, including its header. If possible, use #GNUNET_IDENTITY_sign() instead of this function.

@param priv private key to use for the signing @param purpose what to sign (size, purpose) @param[out] sig where to write the signature @return #GNUNET_SYSERR on error, #GNUNET_OK on success