System.Hash.THashSHA2.GetHashString

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function GetHashString(const AString: string; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; overload; static; inline;
class function GetHashString(const AStream: TStream; AHashVersion: TSHA2Version = TSHA2Version.SHA256): string; overload; static; inline;

C++

static System::UnicodeString __fastcall GetHashString(const System::UnicodeString AString, TSHA2Version AHashVersion = (TSHA2Version)(0x1))/* overload */;
static System::UnicodeString __fastcall GetHashString(System::Classes::TStream* const AStream, TSHA2Version AHashVersion = (TSHA2Version)(0x1))/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Hash.pas
System.Hash.hpp
System.Hash THashSHA2

Description

Creates a hash digest from the provided input value and returns the value of the created digest as a hexadecimal String.

The optional parameter AHashVersion lets you specify the SHA2 variant for this hash. Default value is TSHA2Version.SHA256.

GetHashString accepts one of the following as the input value:

  • AString: A string.
  • AStream: A stream.

See Also