HMACSHA384 Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the HMACSHA384 class.
HMACSHA384() |
Initializes a new instance of the HMACSHA384 class by using a randomly generated key. |
HMACSHA384(Byte[]) |
Initializes a new instance of the HMACSHA384 class by using the specified key data. |
- Source:
- HMACSHA384.cs
- Source:
- HMACSHA384.cs
- Source:
- HMACSHA384.cs
Initializes a new instance of the HMACSHA384 class by using a randomly generated key.
public:
HMACSHA384();
public HMACSHA384 ();
Public Sub New ()
Remarks
This constructor uses a 64-byte, randomly generated key.
See also
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.3, 1.4, 1.6, 2.0, 2.1 |
- Source:
- HMACSHA384.cs
- Source:
- HMACSHA384.cs
- Source:
- HMACSHA384.cs
Initializes a new instance of the HMACSHA384 class by using the specified key data.
public:
HMACSHA384(cli::array <System::Byte> ^ key);
public HMACSHA384 (byte[] key);
new System.Security.Cryptography.HMACSHA384 : byte[] -> System.Security.Cryptography.HMACSHA384
Public Sub New (key As Byte())
Parameters
- key
- Byte[]
The secret key for HMAC computation. The key can be any length. However, the recommended size is 128 bytes. If the key is more than 128 bytes long, it is hashed (using SHA-384) to derive a 48-byte key.
Exceptions
The key
parameter is null
.
Examples
For an example of how to use this constructor, see the HMACSHA384 class.
See also
Applies to
.NET 9 and other versions
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.3, 1.4, 1.6, 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: