Chapter 4 Details of Crypto-C Functions 305
B_DigestFinal
B_DigestFinal
Description
B_DigestFinal finalizes the digesting process for
algorithmObject
and writes the
message digest to
digest
, which is a buffer supplied by the caller of at least
maxDigestLen
bytes, and sets
digestLen
to the length of the digest. 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_DigestInit, so that another message
digesting process may be performed.
Return value
int B_DigestFinal (
B_ALGORITHM_OBJ algorithmObject, /* algorithm object */
unsigned char *digest, /* message digest output buffer */
unsigned int *digestLen, /* length of message digest output */
unsigned int maxDigestLen, /* size of output buffer */
A_SURRENDER_CTX *surrenderContext /* surrender context */
);
Value Description
0 Operation was successful.
non-zero see Appendix A, ”Crypto-C Error Types”