B_DecodeInit
B_DecodeInit

B_DecodeInit

B_DecodeInit

int B_DecodeInit (

 

B_ALGORITHM_OBJ algorithmObject

/* algorithm object */

);

 

 

 

Description

B_DecodeInit allocates and initializes algorithmObject for decoding (not decrypting) data using the algorithm specified by a previous call to B_SetAlgorithmInfo. For example, the AI_RFC1113Recode algorithm provides Base64 encoding and decoding to convert binary data to and from a printable form suitable for most email systems. Notice that there are no cryptographic keys for encoding or decoding.

only needs to be called once to set up a decode algorithm. The B_DecodeUpdate routine can be called multiple times to process blocks of data, and B_DecodeFinal is called once to process the last block which includes removing any trailing pad bytes. After B_DecodeFinal is called, B_DecodeUpdate can be called to start decoding another sequence of blocks. There is no need to call

again.

Return value

Value

Description

0

Operation was successful.

non-zero

see Appendix A, “Crypto-C Error Types”

 

 

2 9 8

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 308
Image 308
RSA Security 5 manual Int BDecodeInit