<PackageReference Include="Azure.Storage.Blobs" Version="12.25.1" />

IHasher

interface IHasher : IDisposable
Interface to wrap either a HashAlgorithm or a NonCryptographicHashAlgorithm to provide a common interface for hashing a stream.
int HashSizeInBytes { get; }

Hash length in bytes.

void AppendHash(ReadOnlySpan<byte> content)

Appends content to hash calculation.

Task<byte[]> ComputeHashInternal(Stream stream, bool async, CancellationToken cancellationToken)

Hashes the contents of the stream.

int GetFinalHash(Span<byte> hashDestination)

Writes the current hash calculation to the given buffer. Note that some implementations have an explicit hash finalization step. Therefore this method should NOT be called to observe a partial calculation.