Class HMACGost3411_2012_512
Inherited Members
Namespace: CryptoPro.Security.Cryptography
Assembly: CryptoPro.Security.Cryptography.dll
Syntax
public class HMACGost3411_2012_512 : HMAC, ICryptoTransform, IDisposable
Constructors
HMACGost3411_2012_512()
Declaration
public HMACGost3411_2012_512()
HMACGost3411_2012_512(Gost28147?)
Declaration
public HMACGost3411_2012_512(Gost28147? key)
Parameters
Type | Name | Description |
---|---|---|
Gost28147 | key |
Properties
Key
Gets or sets the key to use in the HMAC calculation.
Declaration
public override byte[] Key { get; set; }
Property Value
Type | Description |
---|---|
byte[] | The key to use in the HMAC calculation. |
Overrides
Exceptions
Type | Condition |
---|---|
CryptographicException | An attempt is made to change the Key property after hashing has begun. |
Methods
Dispose(bool)
Releases the unmanaged resources used by the HMAC class when a key change is legitimate and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
HashCore(byte[], int, int)
When overridden in a derived class, routes data written to the object into the HMAC algorithm for computing the HMAC value.
Declaration
protected override void HashCore(byte[] rgb, int ib, int cb)
Parameters
Type | Name | Description |
---|---|---|
byte[] | rgb | The input data. |
int | ib | The offset into the byte array from which to begin using data. |
int | cb | The number of bytes in the array to use as data. |
Overrides
HashCore(ReadOnlySpan<byte>)
Routes data written to the object into the HMAC algorithm for computing the HMAC.
Declaration
protected override void HashCore(ReadOnlySpan<byte> source)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | source | The input to compute the HMAC code for. |
Overrides
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | In all cases. |
HashFinal()
When overridden in a derived class, finalizes the HMAC computation after the last data is processed by the algorithm.
Declaration
protected override byte[] HashFinal()
Returns
Type | Description |
---|---|
byte[] | The computed HMAC value in a byte array. |
Overrides
Initialize()
Initializes an instance of the default implementation of HMAC.
Declaration
public override void Initialize()
Overrides
TryHashFinal(Span<byte>, out int)
Attempts to finalize the HMAC computation after the last data is processed by the HMAC algorithm.
Declaration
protected override bool TryHashFinal(Span<byte> destination, out int bytesWritten)
Parameters
Type | Name | Description |
---|---|---|
Span<byte> | destination | The buffer to receive the HMAC value. |
int | bytesWritten | When this method returns, the total number of bytes written into |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | The method is not overriden in the derived type. |