Table of Contents

Method GetHashAsync

Namespace
Innova.Data.File
Assembly
Innova.Data.dll

GetHashAsync(Stream, string, int)

Asynchronously computes the hash value for the specified stream using the specified hash algorithm and a custom buffer size.

public static Task<string> GetHashAsync(this Stream stream, string hashAlgorithmName, int bufferSize = 524288)

Parameters

stream Stream

The stream to compute the hash for.

hashAlgorithmName string

The name of the hash algorithm.

bufferSize int

The size of the buffer used to read the stream.

Returns

Task<string>

A task that represents the asynchronous operation. The task result contains the computed hash value as a string.