Function silc_message_signed_payload_encode
SYNOPSIS
SilcBuffer
silc_message_signed_payload_encode(const unsigned char *message_payload,
SilcUInt32 message_payload_len,
SilcPublicKey public_key,
SilcPrivateKey private_key,
SilcHash hash);
DESCRIPTION
Encodes the SilcMessageSignedPayload Payload and computes the
digital signature. The `message_payload' is the message data that
is used in the signature computation. The encoding of the buffer
is specified in the SILC protocol. If `public_key' is provided
then the public key included in the payload. The `private_key'
is used to produce the signature. This function returns the encoded
payload with the signature or NULL on error. Caller must free the
returned buffer. The `hash' SHOULD be SHA-1 hash function.
Application usually does not need to call this since the function
silc_message_payload_encode calls this automatically if the caller
wants to sign the message.
|