* \param pub: The public key.
* \param inbuf The input buffer.
* \param len The length of \a inbuf.
- * \param outbuf The output buffer.
+ * \param outbuf The output buffer will be allocated by the callee.
*
* \return The size of the encrypted data on success, negative on errors.
*/
int apc_pub_encrypt(struct asymmetric_key *pub, unsigned char *inbuf,
- unsigned len, unsigned char *outbuf);
+ unsigned len, unsigned char **outbuf);
/**
* Decrypt a buffer using a private key.