RSA Security 5.2.2 manual BDestroyAlgorithmObject &asciiDecoder Tfree binaryDecoding

Models: 5.2.2

1 376
Download 376 pages 13.91 Kb
Page 198
Image 198

Converting Data Between Binary and ASCII

if ((status = B_DecodeUpdate

(asciiDecoder, binaryDecoding, &binaryDecodingLenUpdate, asciiEncodingLenTotal, asciiEncoding, asciiEncodingLenTotal)) != 0)

break;

Step 5: Final

Finalize the decoding process, writing out any bytes remaining:

unsigned int binaryDecodingLenFinal;

if ((status = B_DecodeFinal

(asciiDecoder, binaryDecoding + binaryDecodingLenUpdate, &binaryDecodingLenFinal,

asciiEncodingLenTotal - binaryDecodingLenUpdate)) != 0) break;

Step 6: Destroy

When you are done, remember to destroy all objects and free up any memory that has been allocated:

B_DestroyAlgorithmObject (&asciiDecoder);

T_free (binaryDecoding);

1 7 6

R S A B S A F E C r y p t o - C D e v e l o p e r ’s G u i d e

Page 198
Image 198
RSA Security 5.2.2 manual BDestroyAlgorithmObject &asciiDecoder Tfree binaryDecoding