X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FBaseLib.h;fp=MdePkg%2FInclude%2FLibrary%2FBaseLib.h;h=a6f9a194ef1c2898fd0ea4df4e3463dbaf17d14d;hp=9d58a7c4ad13e5a9eb240639370e3f964156e9c6;hb=92288f433485e84863047fae698614c6785869d1;hpb=b09ada6edc7f3f28d3b4f2ef09852ebd39f17920 diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 9d58a7c4ad..a6f9a194ef 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -4503,6 +4503,40 @@ CalculateCrc32 ( IN UINTN Length ); +/** + Calculates the CRC16-ANSI checksum of the given buffer. + + @param[in] Buffer Pointer to the buffer. + @param[in] Length Length of the buffer, in bytes. + @param[in] InitialValue Initial value of the CRC. + + @return The CRC16-ANSI checksum. +**/ +UINT16 +EFIAPI +CalculateCrc16Ansi ( + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 InitialValue + ); + +/** + Calculates the CRC32c checksum of the given buffer. + + @param[in] Buffer Pointer to the buffer. + @param[in] Length Length of the buffer, in bytes. + @param[in] InitialValue Initial value of the CRC. + + @return The CRC32c checksum. +**/ +UINT32 +EFIAPI +CalculateCrc32c ( + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 InitialValue + ); + // // Base Library CPU Functions // @@ -4512,7 +4546,6 @@ CalculateCrc32 ( @param Context1 Context1 parameter passed into SwitchStack(). @param Context2 Context2 parameter passed into SwitchStack(). - **/ typedef VOID