Skip to main content

SHA1 Class

NuGet: GHIElectronics.TinyCLR.Cryptography
Assembly: System.Security.Cryptography
Namespace: System.Security.Cryptography

SHA-1 hash (160-bit). Use HashAlgorithm.Create() overloads or instantiate directly.

public sealed class SHA1 : HashAlgorithm

Properties

Hash

public override byte[] Hash { get; set; }

The hash value computed by the last operation.

Methods

Create()

public static SHA1 Create()

Creates a new SHA-1 instance.

Returns SHA1

ComputeHash(byte[] buffer)

public override byte[] ComputeHash(byte[] buffer)

Computes the hash of the given data.

Returns byte[]

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

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

Computes the hash of a region of the data.

Returns byte[]

ComputeHash(Stream inputStream)

public override byte[] ComputeHash(Stream inputStream)

Computes the hash of a stream.

Returns byte[]

Initialize()

public override void Initialize()

Resets the algorithm to its initial state.

Dispose()

public override void Dispose()

Releases the resources used by the algorithm.