include/SDL_test_crc32.h
changeset 9233 b8eaf9623c0b
parent 8149 681eb46b8ac4
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9232:6ab4ae85c41e 9233:b8eaf9623c0b
    68   } SDLTest_Crc32Context;
    68   } SDLTest_Crc32Context;
    69 
    69 
    70 /* ---------- Function Prototypes ------------- */
    70 /* ---------- Function Prototypes ------------- */
    71 
    71 
    72 /**
    72 /**
    73  * /brief Initialize the CRC context
    73  * \brief Initialize the CRC context
    74  *
    74  *
    75  * Note: The function initializes the crc table required for all crc calculations.
    75  * Note: The function initializes the crc table required for all crc calculations.
    76  *
    76  *
    77  * /param crcContext        pointer to context variable
    77  * \param crcContext        pointer to context variable
    78  *
    78  *
    79  * /returns 0 for OK, -1 on error
    79  * \returns 0 for OK, -1 on error
    80  *
    80  *
    81  */
    81  */
    82  int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
    82  int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
    83 
    83 
    84 
    84 
    85 /**
    85 /**
    86  * /brief calculate a crc32 from a data block
    86  * \brief calculate a crc32 from a data block
    87  *
    87  *
    88  * /param crcContext         pointer to context variable
    88  * \param crcContext         pointer to context variable
    89  * /param inBuf              input buffer to checksum
    89  * \param inBuf              input buffer to checksum
    90  * /param inLen              length of input buffer
    90  * \param inLen              length of input buffer
    91  * /param crc32              pointer to Uint32 to store the final CRC into
    91  * \param crc32              pointer to Uint32 to store the final CRC into
    92  *
    92  *
    93  * /returns 0 for OK, -1 on error
    93  * \returns 0 for OK, -1 on error
    94  *
    94  *
    95  */
    95  */
    96 int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
    96 int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
    97 
    97 
    98 /* Same routine broken down into three steps */
    98 /* Same routine broken down into three steps */
   100 int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
   100 int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
   101 int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
   101 int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
   102 
   102 
   103 
   103 
   104 /**
   104 /**
   105  * /brief clean up CRC context
   105  * \brief clean up CRC context
   106  *
   106  *
   107  * /param crcContext        pointer to context variable
   107  * \param crcContext        pointer to context variable
   108  *
   108  *
   109  * /returns 0 for OK, -1 on error
   109  * \returns 0 for OK, -1 on error
   110  *
   110  *
   111 */
   111 */
   112 
   112 
   113 int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext);
   113 int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext);
   114 
   114