Class OdfCrc32
Computes CRC-32 (ISO-HDLC) checksums with hardware acceleration when available. 在可用時使用硬體加速計算 CRC-32 (ISO-HDLC) 校驗碼。
public static class OdfCrc32
- Inheritance
-
OdfCrc32
- Inherited Members
Methods
Compute(ReadOnlySpan<byte>)
Computes the CRC-32 checksum for the specified bytes. 計算指定位元組的 CRC-32 校驗碼。
public static uint Compute(ReadOnlySpan<byte> bytes)
Parameters
bytesReadOnlySpan<byte>The bytes to process. / 要處理的位元組。
Returns
- uint
The final CRC-32 checksum. / 最終 CRC-32 校驗碼。
Compute(uint, ReadOnlySpan<byte>)
Accumulates CRC-32 state with the specified bytes. 使用指定位元組累積 CRC-32 狀態。
public static uint Compute(uint currentCrc, ReadOnlySpan<byte> bytes)
Parameters
currentCrcuintThe previous CRC state, usually
0xFFFFFFFF. / 先前的 CRC 狀態,通常為0xFFFFFFFF。bytesReadOnlySpan<byte>The bytes to process. / 要處理的位元組。
Returns
- uint
The updated intermediate CRC state. / 更新後的 CRC 中間狀態。