silc_pkcs_encrypt

SYNOPSIS

    SilcBool silc_pkcs_encrypt(SilcPublicKey public_key,
                               unsigned char *src, SilcUInt32 src_len,
                               unsigned char *dst, SilcUInt32 dst_size,
                               SilcUInt32 *dst_len, SilcRng rng);

DESCRIPTION

Encrypts with the public key. Returns FALSE on error. The length the encrypted data is returned to `dst_len' if 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 encryption has been done. In this case the silc_pkcs_encrypt_async should be used.