<PackageReference Include="System.IO.Hashing" Version="10.0.0-preview.7.25380.108" />

Crc32

public sealed class Crc32 : NonCryptographicHashAlgorithm
Provides an implementation of the CRC-32 algorithm, as used in ITU-T V.42 and IEEE 802.3.
public Crc32()

Initializes a new instance of the Crc32 class.

public static byte[] Hash(byte[] source)

Computes the CRC-32 hash of the provided data.

public static byte[] Hash(ReadOnlySpan<byte> source)

Computes the CRC-32 hash of the provided data.

public static int Hash(ReadOnlySpan<byte> source, Span<byte> destination)

Computes the CRC-32 hash of the provided data into the provided destination.

public static uint HashToUInt32(ReadOnlySpan<byte> source)

Computes the CRC-32 hash of the provided data.

public static bool TryHash(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten)

Attempts to compute the CRC-32 hash of the provided data into the provided destination.

public Crc32 Clone()

public uint GetCurrentHashAsUInt32()

Gets the current computed hash value without modifying accumulated state.