Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

LocalItem.GetChecksumAsync Method

Namespace: Rebex.IO
Assembly: Rebex.Common.dll (version 8.0.9673)

GetChecksumAsync(Stream, ChecksumAlgorithm)

Calculates the checksum of the data in specified stream.

Declaration
public static Task<Checksum> GetChecksumAsync(Stream input, ChecksumAlgorithm algorithm)
Parameters
Type Name Description
Stream input

The source data stream.

ChecksumAlgorithm algorithm

Desired checksum algorithm.

Returns
Type Description
Task<Checksum>

Checksum of data in the specified stream.

GetChecksumAsync(String, ChecksumAlgorithm)

Calculates the checksum for the specified file.

Declaration
public static Task<Checksum> GetChecksumAsync(string path, ChecksumAlgorithm algorithm)
Parameters
Type Name Description
String path

Path to the file.

ChecksumAlgorithm algorithm

Desired checksum algorithm.

Returns
Type Description
Task<Checksum>

Checksum of the specified file.

GetChecksumAsync(Stream, ChecksumAlgorithm, Int64, CancellationToken)

Calculates the checksum of the data in specified stream.

Declaration
public static async Task<Checksum> GetChecksumAsync(Stream input, ChecksumAlgorithm algorithm, long count, CancellationToken cancellationToken)
Parameters
Type Name Description
Stream input

The source data stream.

ChecksumAlgorithm algorithm

Desired checksum algorithm.

Int64 count

The maximum number of bytes to process. Values of 0 or less indicates that whole stream to be processed.

CancellationToken cancellationToken

Cancellation token.

Returns
Type Description
Task<Checksum>

Checksum of data in the specified stream.

GetChecksumAsync(String, ChecksumAlgorithm, Int64, Int64, CancellationToken)

Calculates the checksum of the specified part of the specified file.

Declaration
public static async Task<Checksum> GetChecksumAsync(string path, ChecksumAlgorithm algorithm, long offset, long count, CancellationToken cancellationToken)
Parameters
Type Name Description
String path

Path to the file.

ChecksumAlgorithm algorithm

Desired checksum algorithm.

Int64 offset

The offset in the local file at which to start processing.

Int64 count

The maximum number of bytes to process. Values of 0 or less indicates that whole file to be processed.

CancellationToken cancellationToken

Cancellation token.

Returns
Type Description
Task<Checksum>

Checksum of the specified file.

In This Article
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies