Services — Boot Services
Version 1.10 12/01/02 5-93
CalculateCrc32()
Summary
Computes and returns a 32-bit CRC for a data buffer.
Prototype
typedef
EFI_STATUS
CalculateCrc32 (
IN VOID *Data,
IN UINTN DataSize,
OUT UINT32 *Crc32
);
Parameters
Data A pointer to the buffer on which the 32-bit CRC is to be computed.
DataSize The number of bytes in the buffer Data.
Crc32 The 32-bit CRC that was computed for the data buffer specified by
Data and DataSize.
Description
This function computes the 32-bit CRC for the data buffer specified by Data and DataSize.If
the 32-bit CRC is computed, then it is returned in Crc32 and EFI_SUCCESS is returned.
If Data is NULL,thenEFI_INVALID_PARAMETER is returned.
If Crc32 is NULL,thenEFI_INVALID_PARAMETER is returned.
If DataSize is 0, then EFI_INVALID_PARAMETER is returned.
Status Codes Returned
EFI_SUCCESS The 32-bit CRC was computed for the data buffer and returned in
Crc32.
EFI_INVALID_PARAMETER
Data is NULL.
EFI_INVALID_PARAMETER
Crc32 is NULL.
EFI_INVALID_PARAMETER
DataSize is 0.