Skip to main content

HMACSHA1 Class

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

HMAC-SHA1 keyed hash (160-bit output).

public sealed class HMACSHA1 : HMAC

Constructors

HMACSHA1()

public HMACSHA1()

Creates an HMAC-SHA1 with a random key.

HMACSHA1(byte[] key)

public HMACSHA1(byte[] key)

Creates an HMAC-SHA1 with the given key.

Properties

Hash

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

The hash value computed by the last operation.

Key

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

The secret key used by the algorithm.

Methods

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.