Class HmacSha384
- Namespace
- CryptoHives.Foundation.Security.Cryptography.Mac
- Assembly
- CryptoHives.Foundation.Security.Cryptography.dll
Computes the HMAC-SHA-384 message authentication code.
public sealed class HmacSha384 : HmacCore, IMac, IDisposable
- Inheritance
-
HmacSha384
- Implements
- Inherited Members
Remarks
This is a fully managed implementation of HMAC-SHA-384 as defined in RFC 2104, using the CryptoHives SHA-384 implementation. It does not rely on OS or hardware cryptographic APIs, ensuring deterministic behavior across all platforms.
HMAC-SHA-384 produces a 384-bit (48-byte) authentication tag.
Constructors
HmacSha384(byte[])
Initializes a new instance of the HmacSha384 class.
public HmacSha384(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 HmacSha384 class.
public static HmacSha384 Create(byte[] key)
Parameters
keybyte[]The secret key.
Returns
- HmacSha384
A new HMAC-SHA-384 instance.
Hash(byte[], byte[])
Computes the HMAC-SHA-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.