Encrypts a message using ECPVS.
#include "huecpvs.h"
int hu_ECPVSSignEncrypt(sb_Context ecpvsContext, size_t recoverableMessageLen, const unsigned char *recoverableMessage, size_t *rLen, unsigned char *rValue, sb_GlobalCtx sbCtx)
ECPVS context object pointer.
The length (in bytes) of recoverableMessage. Set to 0 if there is no recoverable part of the message.
The recoverable part of the message. This can be NULL if there is no recoverable part of the message.
The length (in bytes) of rValue.
The r component from the signature computation.
A global context.
This is the second API function to be called during the ECPVS signing process. It can be called multiple times to encrypt parts of the message; this is useful if the message is particularly large.
Provide output buffer in rValue, and indicate the amount in rLen. If sufficient amount of buffer is supplied, this function will place the value of r into rValue and set the actual length in rLen. If the buffer is insufficient, this function will return an error.
If rValue is NULL, this function will set the correct length of r in rLen.
The final signature element, r, is the concatenation of all output rValue, in order, by this function.
Context object is NULL.
Context object is invalid.
Global context is NULL.
The recoverable part of the message is NULL and the corresponding length parameter is greater than 0.
No recoverable part of message is supplied when no padding is used.
The signature component length is NULL.
The signature component length is invalid.
Memory allocation failure.
Success.