<PackageReference Include="SshNet.Security.Cryptography" Version="1.1.0-beta1" />

HashAlgorithm

public abstract class HashAlgorithm : IDisposable
Represents the base class from which all implementations of cryptographic hash algorithms must derive.
public virtual bool CanReuseTransform { get; }

Gets a value indicating whether the current transform can be reused.

public virtual bool CanTransformMultipleBlocks { get; }

Gets a value indicating whether multiple blocks can be transformed.

public virtual int HashSize { get; }

Gets the size, in bits, of the computed hash code.

public virtual int InputBlockSize { get; }

Gets the input block size.

public virtual int OutputBlockSize { get; }

Gets the output block size.

protected HashAlgorithm()

public byte[] ComputeHash(byte[] buffer)

Computes the hash value for the specified byte array.

public byte[] ComputeHash(byte[] buffer, int offset, int count)

Computes the hash value for the specified region of the specified byte array.

public byte[] ComputeHash(Stream inputStream)

Computes the hash value for the specified Stream object.

public void Dispose()

Releases all resources used by the current instance of the HashAlgorithm class.

protected virtual void Dispose(bool disposing)

Releases the unmanaged resources used by the HashAlgorithm and optionally releases the managed resources.

protected abstract void HashCore(byte[] array, int ibStart, int cbSize)

Routes data written to the object into the hash algorithm for computing the hash.

protected abstract byte[] HashFinal()

Finalizes the hash computation after the last data is processed by the cryptographic stream object.

public abstract void Initialize()

Initializes an implementation of the HashAlgorithm class.