Class Sha1

Namespace
CHDSharp.Encoder
Assembly
CHDSharpLib.dll

Computes SHA-1 (160-bit) hash digests, backed by the platform's native SHA1 implementation (the digest is identical to any conforming SHA-1 implementation).

public class Sha1 : IDisposable
Inheritance
Sha1
Implements
Inherited Members

Methods

Append(byte[], int, int)

Appends data to the hash computation.

public void Append(byte[] data, int offset, int length)

Parameters

data byte[]

The source byte array.

offset int

The starting offset within data.

length int

The number of bytes to process.

Compute(byte[])

Computes the SHA-1 hash of the given data in one call.

public static byte[] Compute(byte[] data)

Parameters

data byte[]

The data to hash.

Returns

byte[]

A 20-byte array containing the SHA-1 hash.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Finish()

Finalizes the hash and returns the 20-byte SHA-1 digest. The hasher is reset and can be reused (like the classic final/finish semantics).

public byte[] Finish()

Returns

byte[]

A 20-byte array containing the SHA-1 hash.

Reset()

Resets the hasher to its initial state for reuse.

public void Reset()