Skip to main content

HMACSHA256 Class

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

HMAC-SHA256 keyed hash (256-bit output).

public sealed class HMACSHA256 : HMAC

Constructors

HMACSHA256()

public HMACSHA256()

Creates an HMAC-SHA256 with a random key.

HMACSHA256(byte[] key)

public HMACSHA256(byte[] key)

Creates an HMAC-SHA256 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.