B_VerifyInit
338 RSA BSAFE Crypto-C Library Reference Manual
B_VerifyInit
Description
B_VerifyInit initializes
algorithmObject
for verifying 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 public 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_VerifyInit only needs to be called once to set up a verification algorithm. The
B_VerifyUpdate routine can be called multiple times to process blocks of data, and
B_VerifyFinal is called once to process the last block which includes checking the
computed signature against the expected signature that is passed to
B_VerifyFinal.
After
B_VerifyFinal is called, B_VerifyUpdate can be called to start verifying another
sequence of blocks. There is no need to call
B_VerifyInit again.
Return value
int B_VerifyInit (
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”