System.Hash.THashSHA2.GetHMAC
Delphi
class function GetHMAC(const AData, AKey: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; static; inline;
C++
static System::UnicodeString __fastcall GetHMAC(const System::UnicodeString AData, const System::UnicodeString AKey, TSHA2Version AHashVersion = (TSHA2Version)(0x1));
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Hash.pas System.Hash.hpp |
System.Hash | THashSHA2 |
Description
Returns the value of the HMAC-suitable hash digest as a String.
GetHMAC accepts the following parameters:
AData
: The source data for hash digest.AKey
: The secret key.AHashVersion
: Optional. Lets you specify the SHA2 variant for this hash. Default value isTSHA2Version.SHA256
.
For more information on HMAC, see Hash-based message authentication code.