Table of Contents

HmacSecureHashAlgorithm384 Class

Definition

Namespace
Cuemon.Security.Cryptography
Assemblies
Cuemon.Security.Cryptography.dll
Source
src/Cuemon.Security.Cryptography/HmacSecureHashAlgorithm384.cs

Provides a Hash-based Message Authentication Code (HMAC) by using the SHA384 hash function. This class cannot be inherited. Implements the KeyedCryptoHash<TAlgorithm>

public sealed class HmacSecureHashAlgorithm384 : KeyedCryptoHash<HMACSHA384>, IHash, IConfigurable<ConvertibleOptions>
Inheritance
HmacSecureHashAlgorithm384
Implements
Inherited Members

Examples

The following example demonstrates how to compute an HMAC-SHA384 hash with .

// Program.cs
using System;
using System.Text;
using Cuemon.Security.Cryptography;

var secret = Encoding.UTF8.GetBytes("docs-secret-sha384");
var algorithm = new HmacSecureHashAlgorithm384(secret, null);
var result = algorithm.ComputeHash(Encoding.UTF8.GetBytes("Payload for SHA-384"));

Console.WriteLine(result.GetBytes().Length);
Console.WriteLine(result.ToBase64String());

Constructors

Name Description
HmacSecureHashAlgorithm384(byte[], Action<ConvertibleOptions>)

Initializes a new instance of the HmacSecureHashAlgorithm384 class.

See Also

Hash<TOptions>