ContentHasher
Hashes Storage content.
public static void AssertResponseHashMatch(byte[] content, int offset, int count, StorageChecksumAlgorithm algorithm, Response response)
Asserts the content of the given array match the response content hash.
public static Task AssertResponseHashMatchInternal(Stream content, StorageChecksumAlgorithm algorithm, Response response, bool async, CancellationToken cancellationToken)
Asserts the content of the given stream match the response content hash.
public static GetHashResult GetHash(BinaryData content, StorageChecksumAlgorithm algorithmIdentifier)
Computes the requested hash, if desired.
public static Task<GetHashResult> GetHashInternal(Stream content, StorageChecksumAlgorithm algorithmIdentifier, bool async, CancellationToken cancellationToken)
Computes the requested hash, if desired.
public static GetHashResult GetHashOrDefault(BinaryData content, UploadTransferValidationOptions options)
Computes the requested hash for an upload operation, or default.
public static Task<GetHashResult> GetHashOrDefaultInternal(Stream content, UploadTransferValidationOptions options, bool async, CancellationToken cancellationToken)
Computes the requested hash for an upload operation, or default.
public static ValueTuple<ReadOnlyMemory<byte>, StorageChecksumAlgorithm> GetResponseChecksumOrDefault(Response response)
public static ValueTuple<Stream, GetFinalStreamHash, int, IDisposable> SetupChecksumCalculatingReadStream(Stream stream, StorageChecksumAlgorithm algorithmIdentifier)