System.Hash.THashSHA2.GetHMAC

From RAD Studio API Documentation
Jump to: navigation, search

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 is TSHA2Version.SHA256.

For more information on HMAC, see Hash-based message authentication code.

See Also