Function gnunet_sys::GNUNET_CRYPTO_ecdsa_sign_[][src]

pub unsafe extern "C" fn GNUNET_CRYPTO_ecdsa_sign_(
    priv_: *const GNUNET_CRYPTO_EcdsaPrivateKey,
    purpose: *const GNUNET_CRYPTO_EccSignaturePurpose,
    sig: *mut GNUNET_CRYPTO_EcdsaSignature
) -> GNUNET_GenericReturnValue

@ingroup crypto @brief ECDSA 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_CRYPTO_ecdsa_sign() instead of this function (only if @a validate is not fixed-size, you must use this function directly).

@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