Class HmacSha3_384
- Namespace
- CryptoHives.Foundation.Security.Cryptography.Mac
- Assembly
- CryptoHives.Foundation.Security.Cryptography.dll
Computes the HMAC-SHA3-384 message authentication code.
public sealed class HmacSha3_384 : HmacCore, IMac, IDisposable
- Inheritance
-
HmacSha3_384
- Implements
- Inherited Members
Remarks
This is a fully managed implementation of HMAC-SHA3-384 as defined in RFC 2104, using the CryptoHives SHA3-384 implementation based on the Keccak sponge construction. It does not rely on OS or hardware cryptographic APIs, ensuring deterministic behavior across all platforms.
HMAC-SHA3-384 produces a 384-bit (48-byte) authentication tag.
While SHA-3 already provides keyed hashing via KMAC, HMAC-SHA3 is useful for protocol compatibility with systems that standardize on the HMAC construction.
Constructors
HmacSha3_384(byte[])
Initializes a new instance of the HmacSha3_384 class.
public HmacSha3_384(byte[] key)
Parameters
keybyte[]The secret key.
Fields
MacSizeBits
The MAC output size in bits.
public const int MacSizeBits = 384
Field Value
MacSizeBytes
The MAC output size in bytes.
public const int MacSizeBytes = 48
Field Value
Methods
Create(byte[])
Creates a new instance of the HmacSha3_384 class.
public static HmacSha3_384 Create(byte[] key)
Parameters
keybyte[]The secret key.
Returns
- HmacSha3_384
A new HMAC-SHA3-384 instance.
Hash(byte[], byte[])
Computes the HMAC-SHA3-384 tag for the specified key and data in a single operation.
public static byte[] Hash(byte[] key, byte[] data)
Parameters
Returns
- byte[]
The 48-byte MAC tag.