B_SignFinal
332 RSA BSAFE Crypto-C Library Reference Manual
B_SignFinal
Description
B_SignFinal finalizes the digesting process for
algorithmObject
and computes the
digital signature, writing the signature to
signature
, which is a buffer supplied by the
caller of at least
maxSignatureLen
bytes, and sets
signatureLen
to the length of the
signature. The algorithm object for supplying random numbers is
randomAlgorithm
; it
may be (B_ALGORITHM_OBJ)NULL_PTR for signature algorithms that do not need
random numbers. The surrender context for processing and canceling during lengthy
operations is
surrenderContext
; if its value is (A_SURRENDER_CTX *)NULL_PTR, Crypto-
C does not use it.
algorithmObject
is reset to the state it was in after the call to
B_SignInit, so that another signing process may be performed.
Return value
int B_SignFinal (
B_ALGORITHM_OBJ algorithmObject, /* algorithm object */
unsigned char *signature, /* signature output buffer */
unsigned int *signatureLen, /* length of signature output */
unsigned int maxSignatureLen, /* size of output buffer */
B_ALGORITHM_OBJ randomAlgorithm, /* random byte source */
A_SURRENDER_CTX *surrenderContext /* surrender context */
);
Value Description
0 Operation was successful.
non-zero see Appendix A, ”Crypto-C Error Types”