Table of Contents

Class HashStream

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

Passthrough stream which calculates a hash on all the bytes read or written. This is a useful alternative to CryptoStream if you don't want the data to be encrypted, but still want to calculate a hash on the data in a transparent way.

public class HashStream : Stream, IDisposable
Inheritance
HashStream
Implements
Extension Methods

Constructors

HashStream(Stream, HashAlgorithm)

Standard constructor

Fields

hash
target

Properties

CanRead
CanSeek
CanWrite
Length
Position

Methods

Flush()
Hash()

Calculate final hash for the content which has been written or read to the target stream so far.

Hash(byte[])

Calculate final hash for the content which has been written or read to the target stream so far.

Read(byte[], int, int)
Seek(long, SeekOrigin)
SetLength(long)
Write(byte[], int, int)