Class HmacSha3_512
- Namespace
- CryptoHives.Foundation.Security.Cryptography.Mac
- Assembly
- CryptoHives.Foundation.Security.Cryptography.dll
Computes the HMAC-SHA3-512 message authentication code.
public sealed class HmacSha3_512 : HmacCore, IMac, IDisposable
- Inheritance
-
HmacSha3_512
- Implements
- Inherited Members
Remarks
This is a fully managed implementation of HMAC-SHA3-512 as defined in RFC 2104, using the CryptoHives SHA3-512 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-512 produces a 512-bit (64-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_512(byte[])
Initializes a new instance of the HmacSha3_512 class.
public HmacSha3_512(byte[] key)
Parameters
keybyte[]The secret key.
Fields
MacSizeBits
The MAC output size in bits.
public const int MacSizeBits = 512
Field Value
MacSizeBytes
The MAC output size in bytes.
public const int MacSizeBytes = 64
Field Value
Methods
Create(byte[])
Creates a new instance of the HmacSha3_512 class.
public static HmacSha3_512 Create(byte[] key)
Parameters
keybyte[]The secret key.
Returns
- HmacSha3_512
A new HMAC-SHA3-512 instance.
Hash(byte[], byte[])
Computes the HMAC-SHA3-512 tag for the specified key and data in a single operation.
public static byte[] Hash(byte[] key, byte[] data)
Parameters
Returns
- byte[]
The 64-byte MAC tag.