Chapter 4 Details of Crypto-C Functions 333
B_SignInit
B_SignInit
Description
B_SignInit initializes
algorithmObject
for computing a digital signature using the
algorithm specified by a previous call to B_SetAlgorithmInfo. The chooser for
selecting the algorithm method is
algorithmChooser
. The key object for supplying the
key information is
keyObject
, which is typically a private key. 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.
B_SignInit only needs to be called once to set up a signature algorithm. The
B_SignUpdate routine can be called multiple times to process blocks of data, and
B_SignFinal is called once to process the last block, which includes producing the
result. After B_SignFinal is called, B_SignUpdate can be called to start signing
another sequence of blocks. There is no need to call B_SignInit again.
Return value
int B_SignInit (
B_ALGORITHM_OBJ algorithmObject, /* algorithm object */
B_KEY_OBJ keyObject, /* key object */
B_ALGORITHM_CHOOSER algorithmChooser, /* algorithm chooser */
A_SURRENDER_CTX *surrenderContext /* surrender context */
);
Value Description
0 Operation was successful.
non-zero see Appendix A, ”Crypto-C Error Types”