|
| B_DecryptInit |
|
|
|
B_DecryptInit |
|
|
|
|
|
int B_DecryptInit ( |
|
|
B_ALGORITHM_OBJ | algorithmObject, | /* algorithm object */ |
B_KEY_OBJ | keyObject, | /* key object */ |
B_ALGORITHM_CHOOSER algorithmChooser, | /* algorithm chooser */ | |
A_SURRENDER_CTX | *surrenderContext | /* surrender context */ |
); |
|
|
|
|
|
Description
B_DecryptInit initializes algorithmObject for decrypting data using the algorithm specified by a previous call to B_SetAlgorithmInfo. The key object for supplying the key information is keyObject. The chooser for selecting the algorithm method is algorithmChooser. The surrender context for processing and canceling during lengthy operations is surrenderContext; if its value is (A_SURRENDER_CTX *)NULL_PTR,
B_DecryptInit only needs to be called once to set up a key. The B_DecryptUpdate routine can be called multiple times to process blocks of data, and B_DecryptFinal is called once to process the last block, which includes removing the trailing pad bytes. After B_DecryptFinal is called, B_DecryptUpdate can be called to start processing another sequence of blocks that were encrypted in the same key. If a different CBC Initialization Vector (IVs) is used with each sequence of blocks,
can be called with AI_CBC_IV8 to set the new IV before calling B_DecryptUpdate. There is no need to call B_DecryptInit again with the same key.
Return value
Value | Description |
0 | Operation was successful. |
see Appendix A, | |
|
|
C h a p t e r 4 D e t a i l s o f C r y p t o - C F u n c t i o n s | 301 |