silc_pkcs_sign

SYNOPSIS

    SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
                            unsigned char *src, SilcUInt32 src_len,
                            unsigned char *dst, SilcUInt32 dst_size,
                            SilcUInt32 *dst_len, SilcBool compute_hash,
                            SilcHash hash, SilcRng rng);

DESCRIPTION

Computes signature with the private key. If `compute_hash' is TRUE the `hash' will be used to compute a message digest over the `src'. The `hash' is NULL the default hash function is used. The `rng' should always be provided. The length of the signature is returned to `dst_len' is it is non-NULL.

This call cannot be used if `public_key' is accelerated. All accelerators are usually asynchronous and the function will return before the signagture has been done. In this case the silc_pkcs_sign_async should be used.