Subversion Repositories HelenOS

Rev

Rev 4505 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4505 Rev 4558
Line 57... Line 57...
57
 *  @param seed Initial value. Often used as 0 or ~0. Input parameter.
57
 *  @param seed Initial value. Often used as 0 or ~0. Input parameter.
58
 *  @param data Pointer to the beginning of data to process. Input parameter.
58
 *  @param data Pointer to the beginning of data to process. Input parameter.
59
 *  @param length Length of the data in bits. Input parameter.
59
 *  @param length Length of the data in bits. Input parameter.
60
 *  @returns The computed CRC32 of the length bits of the data.
60
 *  @returns The computed CRC32 of the length bits of the data.
61
 */
61
 */
62
uint32_t    compute_crc32_le( uint32_t seed, uint8_t * data, int length );
62
uint32_t    compute_crc32_le( uint32_t seed, uint8_t * data, size_t length );
63
 
63
 
64
/** Computes CRC32 value in the big-endian environment.
64
/** Computes CRC32 value in the big-endian environment.
65
 *  @param seed Initial value. Often used as 0 or ~0. Input parameter.
65
 *  @param seed Initial value. Often used as 0 or ~0. Input parameter.
66
 *  @param data Pointer to the beginning of data to process. Input parameter.
66
 *  @param data Pointer to the beginning of data to process. Input parameter.
67
 *  @param length Length of the data in bits. Input parameter.
67
 *  @param length Length of the data in bits. Input parameter.
68
 *  @returns The computed CRC32 of the length bits of the data.
68
 *  @returns The computed CRC32 of the length bits of the data.
69
 */
69
 */
70
uint32_t    compute_crc32_be( uint32_t seed, uint8_t * data, int length );
70
uint32_t    compute_crc32_be( uint32_t seed, uint8_t * data, size_t length );
71
 
71
 
72
/** Computes sum of the 2 byte fields.
72
/** Computes sum of the 2 byte fields.
73
 *  Padds one zero (0) byte if odd.
73
 *  Padds one zero (0) byte if odd.
74
 *  @param seed Initial value. Often used as 0 or ~0. Input parameter.
74
 *  @param seed Initial value. Often used as 0 or ~0. Input parameter.
75
 *  @param data Pointer to the beginning of data to process. Input parameter.
75
 *  @param data Pointer to the beginning of data to process. Input parameter.
76
 *  @param length Length of the data in bytes. Input parameter.
76
 *  @param length Length of the data in bytes. Input parameter.
77
 *  @returns The computed checksum of the length bytes of the data.
77
 *  @returns The computed checksum of the length bytes of the data.
78
 */
78
 */
79
uint32_t    compute_checksum( uint32_t seed, uint8_t * data, int length );
79
uint32_t    compute_checksum( uint32_t seed, uint8_t * data, size_t length );
80
 
80
 
81
/** Compacts the computed checksum to the 16 bit number adding the carries.
81
/** Compacts the computed checksum to the 16 bit number adding the carries.
82
 *  @param Computed checksum. Input parameter.
82
 *  @param Computed checksum. Input parameter.
83
 *  @returns Compacted computed checksum to the 16 bits.
83
 *  @returns Compacted computed checksum to the 16 bits.
84
 */
84
 */